chore(frontseat-plugin-release-flow): GH-168 guard the generated workflow - #276
Closed
joaodinissf wants to merge 2 commits into
Closed
chore(frontseat-plugin-release-flow): GH-168 guard the generated workflow#276joaodinissf wants to merge 2 commits into
joaodinissf wants to merge 2 commits into
Conversation
…flow TestRepoWorkflowInSync renders the CI workflow from the checked-out template source and byte-compares it against the committed .github/workflows/ci.yml — immune to installed-plugin version skew; -update regenerates the file daemon-free. An hk pre-commit step runs it on any commit touching the workflow or the plugin sources, so hand edits to the generated file and template changes committed without regenerating both fail at commit time. hk stays a local dev tool (mise.local.toml, gitignored). CLAUDE.md documents the workflow and the version-skew trap; the general fingerprint-stamped drift detection is issue GH-248. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ally run Address review: the guard skipped on every run and rendered against the wrong config. - Locate the repo by walking up to go.work from the process CWD instead of runtime.Caller, which GOFLAGS=-trimpath (set by the go plugin) rewrites to a module-relative path that never resolves — the test skipped locally too, not only in the hermetic sandbox. Skip only when go.work is genuinely unreachable; once the root is found a missing ci.yml is drift, not a green skip, so deleting the workflow now fails the test. - Render with the plugin's real options read from frontseat.yaml (spec.plugins["frontseat/release-flow"].options) rather than nil, so the render matches what `frontseat sync` produces and -update can't strip workspace-configured settings out of the committed workflow. - gofmt the drift message; drop the redundant `frontseat daemon restart` (mise dev already restarts it). - Narrow the hk glob to .github/workflows/ci.yml so it no longer fires on the hand-written onboarding-eval.yml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYAgCD9HZHZWEuH4vF17p1
Collaborator
Author
|
Superseded — #247 itself was recoverable after all. Recreating the deleted base ref lets GitHub reopen it, and once open the base can be retargeted to Recipe, for the record: gh api -X POST repos/OWNER/REPO/git/refs -f ref=refs/heads/DELETED_BASE -f sha=MERGED_HEAD_SHA
gh pr reopen N
gh api -X PATCH repos/OWNER/REPO/pulls/N -f base=main
gh api -X DELETE repos/OWNER/REPO/git/refs/heads/DELETED_BASEThe order matters: a closed PR cannot be retargeted, and a PR with a missing base cannot be reopened. |
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.
Replaces #247, which I closed by accident — merging #246 with
gh pr merge --delete-branchdeleted this branch's base and GitHub closed the dependent PR rather than retargeting it. Unrecoverable: a closed PR cannot be reopened while its base is missing, nor retargeted while closed. #275 adds the rule so it does not recur.Same commits, rebased onto
main. Authored by @jbadeau — the rebase preserves authorship; I am only the committer. The rebase also dropped721de1c, which reachedmainvia #246, automatically:git rebaseskips commits whose patch-id already exists upstream.Carrying forward the review context lost with the old thread. Everything raised was addressed in
3a8911e:repoRoot()walks up togo.workfrom the process CWD instead ofruntime.Caller, soGOFLAGS=-trimpathno longer resolves to a module-relative path that never exists. It was skipping locally too, not just in the sandbox.go.workis unreachable. Once the root is found, a missingci.ymlproduces drift and fails — so deleting the workflow now fails the test rather than passing it green.releaseFlowOptions(root)readsspec.plugins["frontseat/release-flow"].optionsfromfrontseat.yamland passes them toConfigure, so the render tracks workspace config. That removes the whole class: any option added later flows through, and-updatecan no longer strip workspace settings out of the committed workflow.&& frontseat daemon restartdropped from the drift message; the hk glob narrowed to.github/workflows/ci.ymlso it no longer fires on the hand-writtenonboarding-eval.yml.Agreed on the framing too: this is a source-level guard for local runs complementing
github:syncin CI, not a CI check itself, and the doc comment now says so.This pull request was published with assistance from Claude.