Skip to content

Add keyless pin automation - #31

Open
jongio wants to merge 5 commits into
mainfrom
jongio-pin-automation
Open

jongio wants to merge 5 commits into
mainfrom
jongio-pin-automation

Conversation

@jongio

@jongio jongio commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Use daily Dependabot proposals for github/evals-action and retain the keyless plugin pin planner with fail-closed blocking.
  • Validate trusted bot-authored pin PRs at the exact current head before enabling auto-merge; serialize publication and completion to prevent races.
  • Keep CodeOwner approval and required protected-branch checks mandatory. No App key, bypass, merge, or live settings changes.

Versioning

The last released base is 0.1.0 (ab32b6a39b174d7ab8e6b3bf731984d555baf642, recorded in #13). The 0.2.0 bump already occurred at a79aa9c5d5483b16fdf1ba437aa80ce417fc7330 and was amended in #28, so this PR updates the existing 0.2.0 entry without another version bump.

Validation

  • node --test .github\scripts\pin-validation.test.mjs .github\scripts\update-pins.test.mjs — 38 passed, 0 failed.
  • npm run lint and git diff --check passed.
  • node --test .github\scripts\*.test.mjs — 347 passed, 250 failed (597 total) in 421.6 seconds. Failures are in unchanged Windows/WSL shell-integration tests: the Windows Bash bridge cannot resolve node and did not pass the scripted approval input; shell exit-status expectations also differ, and Windows cleanup hit EPERM. Representative failure types were reproduced on a clean cfc479c base. The focused pin suites passed.

Hosted checks

All 9 checks passed on 8532f586ededb3173ab8acb4c743025400105cf2, including Validate, Skill eval comparison, CodeQL, and license compliance.

Rollout

No live settings or variables were changed; PIN_AUTOMATION remains unset. Before enabling it, an administrator must allow Actions to create pull requests, enable auto-merge, require the Actions lint status check, require one CodeOwner approval, and require branches to be up to date. PR #31 remains unmerged; the required CodeOwner approval is still pending.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio
jongio requested a review from a team as a code owner November 24, 2026 17:32
Copilot AI adaptive review requested due to automatic review settings November 24, 2026 17:32
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Evals: ✅ Ship (passed)

Skill Verdict Why
update-remote-pins ✅ Ship Increased token usage at parity · score 1.00 → 1.00 (0.00) · -11.9% output tokens (-436) · -16.5% duration
📊 Telemetry, token deltas & run evidence

Selection: Native eval paths or tags

Run: passed - 3 trials - Evidence

Baseline: passed - 3 trials - Evidence

Eval Trials Result
update-remote-pins 3 passed

Quality & token summary

Eval Model Verdict Score Turns Duration Tokens
update-remote-pins claude-haiku-5.5 passed 1.00 (threshold 1.00) 11 22709ms 250777 tokens (247563 in / 3214 out)

Baseline vs. Candidate comparison

Metric Baseline Candidate Delta
Outcome passed passed (✅ Ship) unchanged
Passed 1 1 0
Failed 0 0 0
Turns 10 11 +1
Duration 27188ms 22709ms -4479ms (-16.5%)
Tokens 226694 tokens (223044 in / 3650 out) 250777 tokens (247563 in / 3214 out) +24083 tokens (+10.6%; out: -436 / -11.9%)
Eval Baseline Candidate Score Delta Turns Delta Duration Delta Token Delta Transition
update-remote-pins passed (1.00) passed (1.00) 0.00 +1 -4479ms (-16.5%) +24083 tokens (+10.6%; out: -436 / -11.9%) increased-tokens

Exact revision | Workflow run

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread .github/scripts/pin-validation.mjs Resolved
@jongio
jongio requested an adaptive review from Copilot and removed request for Copilot November 24, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Missing per-head validation gates and strict up-to-date checks allow auto-merge to merge unvalidated replacement heads or untested default-branch combinations.

8 open issues
What changed in this PR

Moves marketplace pin updates from App-based automation to opt-in, keyless workflows using GITHUB_TOKEN and Dependabot, while retaining required checks and human CodeOwner review.

Changes:

  • Restrict the scheduled planner to github/evals plugin pins and use daily grouped Dependabot proposals for github/evals-action.
  • Add a trusted default-branch completion gate to verify validation provenance, PR heads, and pin-only updates before requesting auto-merge.
  • Refresh automation documentation, action pins, and the existing 0.2.0 changelog entry without another version bump.
File Description
README.md Explain Dependabot-managed action-pin proposals.
plugins/​marketplace-maintainer/​skills/​update-remote-pins/​references/​remote-pins.md Document keyless automation and administrator prerequisites.
plugins/​marketplace-maintainer/​CHANGELOG.md Amend the existing 0.2.0 automation notes.
docs/​checks-and-evals.md Replace App/queue setup with keyless guidance and refresh examples.
.github/​workflows/​update-pins.yml Publish plugin-pin proposals using the repository token.
.github/​workflows/​skill-eval-comparison.yml Update three action pins to v0.2.1.
.github/​workflows/​complete-pin-validation.yml Add the trusted Validate completion workflow.
.github/​scripts/​update-pins.test.mjs Revise planner, publisher, and configuration tests.
.github/​scripts/​update-pins.mjs Implement plugin-only planning and keyless publication.
.github/​scripts/​pin-validation.test.mjs Test provenance, pin restrictions, and completion behavior.
.github/​scripts/​pin-validation.mjs Verify automation PRs and request auto-merge.
.github/​dependabot.yml Configure daily grouped updates for github/evals-action.

Review effort: Max (adaptive)

Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread docs/checks-and-evals.md Resolved
Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread .github/scripts/update-pins.mjs Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio

jongio commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Review 6044689142 - ### Changes recommended (concern:c6b1dbbfd20a1940): the completion gate requires successful Validate for the exact current PR head and rechecks the pin/release before publishing status or enabling auto-merge (.github/scripts/pin-validation.mjs:140-167); the publisher disables existing auto-merge before replacing a head (.github/scripts/update-pins.mjs:147). The branch-freshness requirement remains an external rollout prerequisite: the live ruleset does not require lint or up-to-date branches. The setup docs require both before enabling PIN_AUTOMATION (docs/checks-and-evals.md:100-104). I did not change repository settings or the variable; do not enable automation until an administrator configures those protections.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread .github/scripts/pin-validation.mjs Resolved
Comment thread .github/scripts/update-pins.mjs Resolved
Comment thread .github/scripts/update-pins.mjs Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved validation and workflow defects can enable auto-merge for withdrawn or prerelease releases and invalid catalog content, or leave PRs blocked.

1 open issue
4 previously missed issues

In code that hasn't changed since last review

Medium severity Reject missing, draft, or prerelease candidate releases

.github/​scripts/​pin-validation.mjs:80

This checks the tag's spelling and commit, not whether it names a published stable release. For example, github/evals-action marks v0.2.1 as a prerelease even though its tag passes this check, so a v0.2.0 → v0.2.1 proposal can be auto-enabled despite the documented non-stable restriction. Fetch the candidate release by tag and reject missing, draft, or prerelease releases before enabling auto-merge; add the release responses to the test fixtures.

Medium severity Reject noncanonical JSON before comparing pin-only changes

.github/​scripts/​pin-validation.mjs:93

getJson discards duplicate JSON properties before the pin-only comparison, so a modified bot PR can pass this gate with catalog content the comparison never sees. The workflow can then publish successful lint and enable auto-merge for metadata rejected by the bundled local-install validator, although CodeOwner approval still applies. Preserve the raw head response and require the planner's canonical JSON format before proceeding; update the content-response fixtures to use that format.

Medium severity Choose the newest matching run before filtering by status

.github/​scripts/​update-pins.mjs:127

Filtering out failures before selecting the current-head run lets an older success hide a newer failed or cancelled Validate run. If the old bridged lint status and auto-merge request remain, the publisher treats completion as applied and never retries, leaving the PR blocked by the newer failed check. Select the newest matching run first, then reuse it only if active or successful, and cover the mixed success/failure history in a regression test.

Medium severity Reconcile open bot PRs when the release plan is empty or blocked

.github/​workflows/​update-pins.yml:37

When upstream withdraws an already-proposed plugin release, the planner returns no change or blocks, so this path never revisits the open PR. Its previous successful lint status and auto-merge request remain, allowing the unchanged head to merge after CodeOwner approval even though the release is no longer published. Reconcile existing bot PRs when the plan is empty or blocked, disabling auto-merge and closing or revalidating them before returning.

5 resolved since last review

Review effort: Max (adaptive)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio

jongio commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

Copilot review 6050431719 (concern:4e71372668287bab) — previously missed findings

  • Reject missing, draft, or prerelease candidate releases: Fixed in 8532f58 by requiring a matching published stable release before accepting the action pin.
  • Reject noncanonical JSON before comparing pin-only changes: Fixed in 8532f58 by validating the raw Contents API text against canonical JSON before comparing pins.
  • Choose the newest matching run before filtering by status: Fixed in 8532f58 by selecting the newest current-head Validate run before inspecting its state.
  • Reconcile open bot PRs when the release plan is empty or blocked: Fixed in 8532f58: blocked plans disable auto-merge and fail visibly; empty plans disable auto-merge and close the obsolete PR.

@jongio

jongio commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

Copilot review 6047865463 (concern:a0988ecc37031fd1) — prior findings

  • Require pin replacements to preserve step settings: fixed in 029e559; changed action pins must remain in their original diff block.
  • Serialize completion with pin publication: fixed in 029e559; plugin completion shares the publisher's non-canceling lock.
  • Match Dependabot's digest-suffixed grouped branch: fixed in 029e559; only the configured group prefix plus its digest is accepted.
  • Filter prerelease candidates to the current release channel: fixed in 029e559; candidate selection stays within the pinned channel.
  • Retry completed validations when completion did not take effect: fixed in 029e559; successful Validate runs are reused only when the expected completion effect is present.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A raw-content parsing mismatch breaks plugin-pin completion, while Dependabot auto-merge can remain enabled for new heads before their release and ancestry are verified.

1 open issue
1 resolved since last review

Review effort: Max (adaptive)

Comment on lines +91 to +93
const file = getJson(api, endpoint);
if (file.encoding !== "base64" || typeof file.content !== "string") throw new Error(`${endpoint}: marketplace content is not base64 encoded.`);
const text = Buffer.from(file.content.replace(/\s/g, ""), "base64").toString("utf8");
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.

3 participants