github: tolerate free-text introduction lines in the stack footer parser - #1419
Open
netproteus wants to merge 1 commit into
Open
github: tolerate free-text introduction lines in the stack footer parser#1419netproteus wants to merge 1 commit into
netproteus wants to merge 1 commit into
Conversation
parse_stack_information() previously gave up at the first non-bullet line after the footer marker unless that line happened to start with "Stack created with [Sapling]". Editing the footer prose on github.com (or customizing it) therefore silently broke `sl pr pull` ancestor linking, even though ReviewStack's client-side parser explicitly treats such lines as a free-text introduction. Once the modern "[//]: # (BEGIN SAPLING FOOTER)" marker has been seen, skip non-bullet lines before the first stack entry instead of aborting; the first non-bullet line after the entries still terminates the list. Legacy marker-less bodies keep the previous conservative behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Change-Id: I5001d29f86e81b842f6bb5c9f7e4fe74dda24627
|
This pull request has been imported. If you are a Meta employee, you can view this in D116548305. (Because this pull request was imported automatically, there will not be any future comments.) |
netproteus
force-pushed
the
footer-parser
branch
from
August 19, 2026 00:54
0c34110 to
81e6a3b
Compare
|
@netproteus has updated the pull request. You must reimport the pull request before landing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #1410 per review feedback (discussion) — that PR makes the footer's review link configurable; this one hardens the parser that reads the footer back. The two are independent: this change applies directly to
main.Motivation
The stack footer is part of the PR description, so anything that edits the description on github.com can perturb it: an author adding a test plan from the web UI, a reviewer fixing a typo, a bot that rewrites PR bodies. Today, any non-bullet line left between the footer marker and the bullet list makes
parse_stack_informationreturn[], and the only symptom is thatsl pr pullsilently stops linking the stack — no error is shown.ReviewStack's own parser already implements this more tolerant grammar:
eden/contrib/reviewstack/src/saplingStack.tstreats non-bulleted lines after the marker as introduction prose, and its design comment anticipates that text changing over time ("particularly if someone wants to run their own fork of ReviewStack") — which #1410 enables.Behavior
[//]: # (BEGIN SAPLING FOOTER)marker, free-text lines before the first bullet are skipped.Tests
Doctests cover the tolerated introduction, after-list termination, and the legacy conservative path.
🤖 Generated with Claude Code