Skip to content

LLP 0382 request: the control surface answers absolute-form exactly where LLP 0247 said it never would #1918

LLP 0382 request: the control surface answers absolute-form exactly where LLP 0247 said it never would

LLP 0382 request: the control surface answers absolute-form exactly where LLP 0247 said it never would #1918

Workflow file for this run

# Generated by `neutral init`. Blocks a PR (and reddens the default branch) when two
# LLP docs share a number: concurrent branches can each mint the same NNNN cleanly
# and only collide in the merged tree. Fix: renumber the doc that landed second to
# the next free number across ALL branches, and retarget the @refs that meant it
# (they still resolve, to the wrong doc, so no ref checker will flag them).
name: llp-check
on:
push:
branches: [main, master]
pull_request:
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
duplicate-numbers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: No duplicate LLP numbers
run: |
dups=$(find llp -path llp/reviews -prune -o -type f -name '[0-9][0-9][0-9][0-9]-*.md' -print | sed 's|.*/||' | cut -c1-4 | sort | uniq -d)
[ -z "$dups" ] && exit 0
echo "Duplicate LLP numbers: $dups" >&2
for n in $dups; do find llp -path llp/reviews -prune -o -name "$n-*.md" -print >&2; done
echo "Fix: renumber the doc that landed second to the next free number across all branches (tombstones count - numbers are never reused), and update the @refs that meant it." >&2
exit 1
# The in-tree job above only sees a collision once both documents are in one
# tree, which is after the second merge. Three branches minting the same number
# in parallel is not visible from any one of them (issue #907), so this job
# fetches every branch and asks whether the number this one mints is already
# claimed somewhere else. It reports only the numbers this branch adds, so a
# collision already settled on master, still carried by a stale branch that
# predates the repair, does not redden pull requests party to none of it.
cross-branch-numbers:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fetch every branch that could merge
run: git fetch --no-tags --prune origin '+refs/heads/*:refs/remotes/origin/*'
- name: No newly minted LLP number is claimed elsewhere
run: node scripts/llp-numbers.js check
required:
name: LLP required
if: ${{ always() }}
needs: [duplicate-numbers, cross-branch-numbers]
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Confirm required jobs passed
env:
DUPLICATE_NUMBERS_RESULT: ${{ needs.duplicate-numbers.result }}
CROSS_BRANCH_NUMBERS_RESULT: ${{ needs.cross-branch-numbers.result }}
run: |
test "$DUPLICATE_NUMBERS_RESULT" = success
test "$CROSS_BRANCH_NUMBERS_RESULT" = success