Repository navigation
Conversation
The Admin page now previews the live release state and can dispatch the existing daily-release workflow after a typed confirmation, recent GitHub re-authentication, CSRF and the destructive rate limit. The action never tags, merges or deploys; the normal release PR, gates, auto-merge, tag and publish chain stay in charge. The dispatch token is server-side and repo-scoped.
14 tasks
Owner
Author
|
Written-by: HugoXK @HugoXK-bot reviewer queue: this T3 PR is at This is the #897 one-click release action; the server-side token is configured, and this PR is the remaining gate. |
HugoXK
enabled auto-merge (squash)
November 16, 2026 08:23
This branch has not been deployed
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.
Written-by: HugoXK
Fixes #897
What changed
src/lib/releaseDispatch.ts: a live preview of the GitHub release state (main SHA, latest tag, commits/fixes/features/fragments, next version,ci-ok, open release PR, tag/branch existence) and aworkflow_dispatchcall for the existingdaily-release.yml.RELEASE <version>confirmation and a “Create release PR” button.POST /admin/release: superadmin + CSRF + recent GitHub re-authentication + destructive rate limit + audit + a fresh preview and idempotency check before dispatch. It never tags, merges or deploys.releaseconfig section and.env.exampledocumentation forRELEASE_DISPATCH_TOKEN,RELEASE_DISPATCH_REPO,RELEASE_DISPATCH_WORKFLOWandRELEASE_DISPATCH_REF.docs/architecture.md/docs/deploy.mddocuments,docs/secrets.mdinventory row, changelog fragment andtest/releaseDispatch.test.ts.Why
Production already runs
main, which can be ahead of the latest release tag. The owner wants a superadmin one-click action that turns the currentmaininto the next mechanical release without bypassing the existing release PR,ci-ok,review-gate, auto-merge, tag and publish chain.The current GitHub App has
actions: readonly, so the server cannot dispatch the workflow with its installation token. v1 uses a dedicated server-sideRELEASE_DISPATCH_TOKENwithActions: writeon the Fledge repository only; an empty value disables the action instead of failing the Admin page. The server.envis configured with the existing bot token until a fine-grained repo-scoped token replaces it.This is the v1 scope: no force/threshold bypass and no version-bump selector. The current backlog already meets the normal 10/5/1 rule, so the button dispatches without
force.Verification
Ran:
npm run lint— pass (11 warnings match the baseline)npm run typecheck— passnpm run build— passnpx tsx --test test/releaseDispatch.test.ts— 7/7 passnpx tsx --test test/routeClassSweep.test.ts test/secretsDoc.test.ts test/pages.test.ts— 71/71 passnpm test— 2440 tests, 2438 pass, 2 environment failures (test/gateBaseTree.test.ts,test/nginxCheck.test.ts) that also fail on a cleanorigin/mainworktree; both need tooling absent here.ci-ok,coverage,pr-lint,risk,lint,typecheck,build,test,docker, CodeQL and the route/secrets tests are green.review-gateis red only because T3 still needs theHugoXK-botPASS at this tip.Not run: a real
workflow_dispatchagainst GitHub from this checkout (the credential is server-side and deliberately not available here); the Docker image; a real GitHub API preview from this checkout.Security notes
POST /admin/releaserequires superadmin, CSRF, recent GitHub re-authentication, the destructive rate-limit class and an audit row.Docs
docs/architecture.md,docs/deploy.md,docs/secrets.mdandchangelog.d/897-one-click-release.added.md.