ci: implement ci#369 change-detector — advisory-only version-selection heuristic - #375
Open
opoudjis wants to merge 1 commit into
Open
ci: implement ci#369 change-detector — advisory-only version-selection heuristic#375opoudjis wants to merge 1 commit into
opoudjis wants to merge 1 commit into
Conversation
…n heuristic Implements the design brief from #369, per the 4 stated leans in our engagement comment (use-only-if-present public_api.txt; skip on first-release; workflow_dispatch-only dispatch scope; no repository_dispatch payload field). New: - .github/scripts/release-version-advisory.rb: Ruby, Prism (stdlib) AST diff of lib/ between prev-tag and HEAD, multi-signal public/internal classification, markdown table + ::notice:: output. Exit 0 always. - .github/scripts/test-fixtures/version-advisory/: 5 fixtures + assert-mode runner + generated expected.md golden files. - .github/workflows/test-version-advisory.yml: CI fixture suite + AC 6 static-grep no-network-libs enforcement. Modified: - .github/workflows/rubygems-release.yml: new `version_advisory` boolean input (default false, opt-in per P2); three preflight steps guarded by `if: inputs.version_advisory == true` (fetch history / fetch script / run). No behaviour change when consumers don't set the input. - docs/rubygems-release.md: Inputs-table row + "Version advisory (opt-in)" section documenting signals, classification table, Phase 2 limitations. AC 4 coverage: 5 fixtures (a-e) pass byte-exact against golden expected.md. AC 5: output only via $GITHUB_STEP_SUMMARY + ::notice::; only one new input. AC 6: enforced statically via CI grep. Phase 2 (not blocking): class << self, attr_accessor family, inheritance changes, define_method metaprogramming — documented in script header + docs. Refs #369
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.
Refs #369
Implements the design brief from #369, per the 4 stated leans in our engagement comment (use-only-if-present
public_api.txt; skip-on-first-release;workflow_dispatch-only dispatch scope; norepository_dispatchpayload field).What lands
.github/scripts/release-version-advisory.rb— Ruby, ~540 lines. Prism (stdlib) AST diff oflib/between prev-tag and HEAD; multi-signal public/internal classification; markdown table +::notice::output. Exit 0 always (rescue clause backstops P1)..github/scripts/test-fixtures/version-advisory/— 5 fixtures +run-fixtures.sh(assert mode +--generate-goldenbootstrap)..github/workflows/test-version-advisory.yml— CI runs the fixture suite + a static-grepno-network-libsjob enforcing AC 6..github/workflows/rubygems-release.yml— newversion_advisoryboolean input (defaultfalse, opt-in per P2). Three preflight steps guarded byif: inputs.version_advisory == true(fetch history / fetch script / run script). No behaviour change when consumers don't set the input.docs/rubygems-release.md— new "Version advisory (opt-in)" section documenting signals, classification table, and Phase 2 limitations.AC 4 coverage — 5 fixtures, all pass
Foo::internal_helpermarked# @api privateFoo::new_public_methodmarked# @api publicFoo::public_thingbody changed, same signatureFoo::transformpositional arg removedGolden
expected.mdper fixture. Assertion is byte-exact.AC 5, 6
$GITHUB_STEP_SUMMARY+::notice::. Only new input on the reusable isversion_advisory. No wrapper-hostile plumbing.test-version-advisory.yml'sno-network-libsjob — fails CI if any ofnet/http/open-uri/faraday/httparty/excon/typhoeus/httpappears as arequire. Actual requires are Prism, Open3, JSON, Digest — all stdlib.Phase 2 limitations (documented in script header + docs, not blockers)
class << selfblocks not distinguished from instance methods.attr_accessor/attr_reader/attr_writeraccessors not extracted.define_method/class_evalmetaprogramming not covered.None impact AC 4 pass. All are extendable in follow-up PRs without shape change.
Test plan
ruby -c .github/scripts/release-version-advisory.rb— syntax OK.bash .github/scripts/test-fixtures/version-advisory/run-fixtures.sh— 5/5 pass locally.test-version-advisory.ymlruns on this PR.with: { version_advisory: true }on theirrubygems-release.ymlcall. Default off = no behaviour change for existing consumers.🤖