fix(github): harden Variable + Comment reconcile + add lifecycle convergence tests#226
Open
sam-goodwin wants to merge 1 commit intomainfrom
Open
fix(github): harden Variable + Comment reconcile + add lifecycle convergence tests#226sam-goodwin wants to merge 1 commit intomainfrom
sam-goodwin wants to merge 1 commit intomainfrom
Conversation
…ergence tests - Variable: tolerate 422 race on createRepoVariable, fall through to PATCH - Variable: skip PATCH on no-op so updatedAt is preserved across redeploys - Variable: replace on owner/repository/name change - Comment: only PATCH when observed body drifts from desired - Comment: replace on owner/repository/issueNumber change - Add per-resource lifecycle convergence tests gated on GITHUB_TEST_OWNER / GITHUB_TEST_REPO / GITHUB_TEST_ISSUE_NUMBER env vars Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
Install the packages built from this commit: alchemy bun add alchemy@https://pkg.ing/alchemy/17c0d50@alchemy.run/better-auth bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/17c0d50@alchemy.run/pr-package bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/17c0d50 |
Contributor
Website Preview DeployedURL: https://alchemyeffectwebsite-worker-pr-226-gtuxpn3scert62y3.testing-2b2.workers.dev Built from commit This comment updates automatically with each push. |
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.
Hardens the GitHub
VariableandCommentresources, mirroring the per-resource sweep started in #184. Single GitHub scope;Secretis being hardened separately.Reconciler changes
Variable— tolerate the create race and skip the PATCH on a true no-op soupdatedAtdoesn't churn:Comment— only PATCH when the observed body drifts from desired (instead of always issuing the call), so a redeploy with the samebodyis a true no-op:Both resources gain a
diffthat triggersreplacewhen the GitHub-side identity changes —(owner, repository, name)forVariable,(owner, repository, issueNumber)forComment. Previously a name/target change would silently create a second resource and orphan the old one.New lifecycle tests
Each test runs
destroy → deploy → … → destroyon aScratchStackand asserts convergence at every step. Gated onGITHUB_TEST_OWNER/GITHUB_TEST_REPO/GITHUB_TEST_ISSUE_NUMBER(+GITHUB_TEST_ISSUE_NUMBER_2for the Comment replace test); skipped otherwise.Variable:updatedAtpreserved)nametriggers replace; old variable is deletedadopt(true)re-claims a foreign variableComment:commentIdandupdatedAtpreserved)commentId)issueNumbertriggers replace