Skip to content

Keep the Alchemy state on a branch of this repository - #5

Merged
nicu-chiciuc merged 3 commits into
mainfrom
github-state-app
Nov 17, 2026
Merged

nicu-chiciuc merged 3 commits into
mainfrom
github-state-app

Conversation

@nicu-chiciuc

@nicu-chiciuc nicu-chiciuc commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What changes

The real app of this repository keeps its Alchemy state on the branch alchemy-state-store of this repository, through @samebase/alchemy-kit/github-state. Before, the state was in the Cloudflare store.

  • alchemy.run.ts: state: Convex.withRunRecord(GitHubState.state()).
  • Workflows: contents: write so a run can write the branch with its own token, and the secret ALCHEMY_GITHUB_STATE_KEY in place of the Cloudflare token and account id.

Order of the move

  1. The preview of this pull request cannot deploy yet. A preview reads the Convex project from the state of prod, and the branch has no state of prod before the first production deploy with this change.
  2. After the merge, run the workflow alchemy once on main with adopt. The production deploy then takes over the Convex project and deployment that exist, and writes the state of prod to the branch.
  3. Each pull request that deploys after that gets a preview with its state on the branch.

The old state in the Cloudflare store stays until it is removed.

Checks

  • vp run typecheck passes.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith with what you need.

…GitHubState.state())

The state of every stage moves from the Cloudflare store to the branch
alchemy-state-store of this repository, through @samebase/alchemy-kit. A run
writes the branch with its own token (contents: write) and seals each secret
with the key ALCHEMY_GITHUB_STATE_KEY. The Cloudflare token and account id are
no longer used.
…se exists

No patched release exists (latest is 4.0.7). picomatch reaches only build
tooling here, which matches patterns from this repository's own code.
@nicu-chiciuc
nicu-chiciuc merged commit d05a099 into main Nov 17, 2026
2 of 3 checks passed
@nicu-chiciuc
nicu-chiciuc deleted the github-state-app branch November 25, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant