Repository navigation
ci: pin docs that a failed run left behind, and never older ones - #307
Merged
Merged
Conversation
The job that pins fctl.sh to fctl's docs compared docs/ with the commit before the push. When the push that changed them failed its checks, the next push saw no change in docs/ and skipped the pin, so fctl.sh kept the old docs until another push changed docs/ (v0.8.0's two-factor sign-in and passkeys, on 2026-10-19). A run that finished after a newer one, such as an old commit's run started again, pinned its older commit. It now reads the pin from fctl-site's main, in a clone that needs no key (fctl-site is public), and pins this commit when its docs/ differ from the pinned commit's, unless the pin already has this commit (git merge-base --is-ancestor). A pin that isn't the full hash of a commit here, such as main, is replaced. The new pin is committed on the same clone, so a pin someone pushes meanwhile makes the rebase conflict rather than being overwritten. Since it no longer needs the push's before, the job also runs when CI is started by hand on main, as the deploy does. Refs #105
kalaspuff
approved these changes
Oct 28, 2026
kalaspuff
deleted the
fctl/411-this-seems-rare-i-ve-only-seen-it-twice
branch
October 28, 2026 14:29
3 tasks done
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
fctl.sh kept old docs whenever the push that changed them failed its checks. The pin job compared
docs/with the commit before the push, so the next push, which changed no docs, skipped the pin. The job now reads the pin from fctl-site'smain, in a clone that needs no key since fctl-site is public, and pins the run's commit when itsdocs/differ from the pinned commit's. It never pins a commit older than the pinned one (git merge-base --is-ancestor), so a re-run of an old commit, or checks that finish after a newer push's, leave the pin alone. The new pin is committed on that same clone, so if someone else pins in between, the rebase conflicts and nothing is overwritten.I ran the job's two steps, taken from this
ci.yml, against local stand-ins for fctl and fctl-site in 15 cases, underbash -eandbash -eo pipefail: the issue's sequence, runs finishing out of order, pins ofmainor of unknown or abbreviated hashes, a pin on another branch, and fctl-site'smainmoving before the push. On the same history the old step skipped the issue's pin and re-pinned an older commit. The decision step also ran read-only against the real fctl-site, and actionlint (with shellcheck) passes. This pull request changesdocs/development.md, so the first run onmainafter the merge should pin through the new steps.Worth confirming
before, so it now also runs when CI is started by hand onmain, as the deploy does. Session 283 needed exactly that when GitHub started no CI for feat(cli): add secrets, members, sharing, archiving and agent settings #270's merge: a hand-started run deployed app.fctl.sh but couldn't pin the docs. Starting CI onmainnow brings fctl.sh's docs up to date too, whereas re-running an old run would also redeploy that run's old build.fctl-docs.refthat isn't the full hash of a fctl commit (main, a tag, an abbreviated hash) is replaced with the run's commit by the next run that passes its checks. Before, only the next push that changeddocs/replaced it.Fixes #105
fctl session