feat(stack): topic branch names and per-file notes in PR bodies - #36
Merged
Conversation
Stack layers now publish as review/<NN>-<review>-<topic>, with the topic cut from the commit subject. Each layer starts under a deterministic provisional name (review/<NN>-<review>-wip-<base>) and is renamed once its commit exists; resumed runs find published layers by listing the deterministic prefix and verifying candidates by commit graph, so a same-named branch from an older stack is rejected by ancestry, and a taken topic name gets the stack's short base commit appended. The preflight probe moved to the same namespace, and review/ branches are excluded from merge-target listings like gauntlet/. PR bodies render the per-file PATH: lines a review prints beside the paths its commit touched; notes are matched against the commit's own file list, sanitized and bounded like every other untrusted value, and the whole body is capped. The suffix protocol now spells out the parseable PATH line form.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
Two improvements to what a stacked-PR run publishes.
Branch names. Stack layers were named
gauntlet/stack/<tip12>/<NN>-<review>, which says nothing about the change. They now publish asreview/<NN>-<review>-<topic>(e.g.review/03-sec-review-input-validation): NN is the 1-based schedule position, so merge order stays visible and sortable, and the topic is a slug cut from the layer's commit subject. Because the topic does not exist before the review commits, each layer starts under a deterministic provisional name (review/<NN>-<review>-wip-<base6>) and is renamed just before the push. Resume and recovery no longer recompute one exact name: they list local and remote branches under the deterministicreview/<NN>-<review>prefix and verify each candidate by commit graph — a recovered layer must be a one-commit child of the previous layer's tip — so a same-named leftover from an older stack is rejected by ancestry, and when such a leftover occupies the topic name the new layer appends the stack's short base commit at the end. Recovery also finishes the rename for a run killed between commit and push, from the stranded commit's own subject. The preflight dry-run probe moved to the samereview/namespace, andreview/branches are excluded from merge-target listings the same waygauntlet/already was.PR bodies. The
## Changessection listed bare paths. The runner now parses the per-filePATH: <file>: <what was done>lines the review protocol already asks for and renders them beside the paths (- \path` — what was done). Notes are matched against the layer's own commit, so a note naming a file the commit never touched is dropped; each note is flattened, length-bounded, and backtick-neutralized like every other untrusted value in the body, and the whole body is now capped. A layer with no usable notes renders exactly what it rendered before.rules/suffix.md` now spells out the parseable line form.Testing
make checkandmake test(full suite, race detector, shuffled) pass.ParseFileNotes(dedupe, sanitization, bounds), and hostile-input body rendering (markdown injection, unbalanced backticks, long paths).