Commit Graph
83 Commits
Author SHA1 Message Date
Zakk ab536be951 .github: keep tokens out of builds and sanitize bot comments
The autobump engine opens pull requests with gh and git push, so its
environment must keep GH_TOKEN. Portage passes that environment into
every ebuild phase, which builds unreviewed upstream releases, so both
autobump workflows add the token variables to ENV_UNSET in make.conf.
ENV_UNSET is incremental and needs EAPI 7, which every overlay ebuild
already uses.

The nvchecker job exports a personal access token right after its pip
install, so an unpinned release of any dependency could read it. The
job now installs exact versions with hashes for the runner's Python
3.12. Regenerate .github/nvchecker-requirements.txt with:

  printf '%s\n' nvchecker==2.22 jq==1.13.0 portage==3.0.83 |
    uv pip compile - --generate-hashes --python-version 3.12 \
    --no-header --no-annotate

A pull request's own run writes findings.json and the elog artifacts,
so a line starting with a backtick run could close the code fence and
post markdown under github-actions[bot]. Backticks in that text now
become quotes. The commit subject in the pull request rules comment is
not fenced at all, so it now goes into a code span with its backticks
and control characters replaced.

emerge-targets.sh turned a new top-level file such as SECURITY.md into
the atom SECURITY.md/, which failed emerge-on-pr, so paths without
category/package/file are skipped.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-18 01:11:14 +11:00
Zakk 7b576bf208 AGENTS.md, .agents/rules: add prebuilt, license, fork and autobump rules
Prebuilt glibc floors go in a per-arch RDEPEND because REQUIRED_USE="elibc_glibc" is an error-level pkgcheck finding on musl profiles and fails CI for a new package (jcode-bin, #16779). Per-arch payloads are checked separately because one arch can link OpenSSL and another not.

LICENSE must cover bundled components (ayugram-desktop, #16785: static ICU, sqlite, sqlite_orm). A fork of a ::gentoo package starts from the current ::gentoo ebuild instead of reviving what ::gentoo dropped.

Library bumps compare upstream dependency minimums because CI does not rebuild consumers (headerkit/pyrime, #16585). Entries with "# autobump off:" stay off (#16780). Overlay masks are repository-scoped. GIT_CRATES URLs follow Cargo.lock. Benign elog claims need the condition reproduced.

scripts/autobump.md: drafts now come from arches outside amd64 and arm64, not from "only amd64".

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-15 00:18:23 +11:00
Zakk 186b77d222 scripts/autobump-sweep.py: do not fail collect on a bundle escalation already commented
bundles.py plan exits 1 on every escalated bundle target, every run, until
the target is retried. The sweep turned that exit status into bundle_error,
so collect failed on each run even after the escalation comment was on the
issue (cc-switch: crate-dist.yml refused the dispatch with HTTP 422 because
Actions is disabled; honk: overlay.toml deps needs a tag).

Match each `failed:` line of the controller to a target in state escalate.
When all of them are matched, post the escalation comment again for the
targets that are not new this run, and clear bundle_error only if every
comment landed. Because the controller latches an escalation in the ledger
even when its comment failed, a latched target cannot be assumed to be
commented. The matched targets are listed under "bundle escalations
awaiting a maintainer" in the collect summary and $GITHUB_STEP_SUMMARY.
An unknown state, an owner the controller stopped asking, a controller
that exits non-zero without a `failed:` line, and a comment that cannot be
posted still fail the run.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-13 18:07:01 +11:00
ZakkandYongxiang Liang 36e9c08555 .github: record the build environment in the emerge elog comment
The stage3 tag, the Gentoo tree and the binhost move on every day, and a
run's logs and artifacts expire, so a failed pull request run could not
be reproduced later. The comment now keeps the image, the tree commit,
the packages the job merged and emerge --info, and the dated stage3 tag
keeps the image itself for a week.

Co-authored-by: Yongxiang Liang <tanekliang@gmail.com>
Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-08 17:43:48 +11:00
Zakk 7dccf8038b scripts/autobump-sweep.py: tell opted-out packages the bump is manual
The bundle controller also prepares bundles for packages without the autobump key, and its issue comment ended with "Will retry automatically", although no bump follows (app-crypt/cotp, issue 15683). For such a package the comment now says to bump it by hand once the bundle is released, or fixed when it escalates.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-27 09:20:16 +00:00
Zakk 668a5c25ee .github: name the fix for each missing slot or binding operator
The emerge-on-pr report listed qa-vdb's "old | new" pairs under one generic sentence. Each pair now reads as the edit to make: "Add := to <atom>" when only := is missing, "Change <old> to <new>" otherwise. Lines in any other form stay as qa-vdb printed them.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-27 08:44:38 +00:00
Zakk 7d7dd0fa5a scripts/autobump-sweep.py: leave the tree listings out of escalations
An escalation comment attached tree-new.txt and tree-old.txt, every file
of both unpacked trees. They name no failure and made up most of the
32 KB pnpm comment on #15482, while tree-added.txt and tree-removed.txt
already carry the difference and the run's evidence artifact keeps the
listings whole.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-23 16:00:46 +11:00
Zakk 432f60b725 scripts/emerge-qa.sh: exclude @system packages from qa-vdb
Ebuilds do not declare @system members, but the default qa-vdb exclude
list only covers the toolchain, so every package linking libuuid, libkmod
or liblzma got a missing dependency notice for util-linux, kmod or
xz-utils.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-23 14:44:01 +11:00
Zakk 5c381e317e .github: report emerge-on-pr QA notices by kind
The comment pasted the raw Portage headers of the qa-vdb and LDFLAGS
notices into one block per profile, counted blocks as notices, and left
the reader to decide which output needs a change.
emerge-qa.sh now writes the qa-vdb dependency lines and the files built
without LDFLAGS to separate files. The comment marks missing
dependencies, missing slot or binding operators and files built without
LDFLAGS as needing a fix and states the fix for each. Messages of the
target, elog of dependencies and autounmask entries are marked as
informational. The elog column spells out its counts and plurals.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-23 10:41:17 +11:00
Zakk 926ac31e80 .github: report qa-vdb and LDFLAGS QA notices in emerge-on-pr
emerge-on-pr now runs qa-vdb from app-portage/iwdevtools after
pkg_postinst, as qa-vdb(1) shows for /etc/portage/bashrc, and appends
-Wl,--defsym=__gentoo_check_ldflags__=0 to LDFLAGS, so Portage reports
files built without respecting LDFLAGS. qa-vdb compares RDEPEND with
the libraries the package links to and can report dependencies that a
package loads with dlopen or does not need, so both notices are listed
in the pull request comment and do not fail the job. Every other QA or
ERROR elog of the target still fails it.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 23:34:01 +11:00
Zakk d06ff6a93f scripts: find the pull request after it is merged
pr-at-commit.sh searched only open pull requests, so a pull request
merged before the comment run of its last workflow finished kept the
"emerging" status line in the bot comment, as on #15346 and #15348.

It now also searches the 30 most recently updated closed pull requests
and accepts a merged one whose head is the commit. A rebase merge keeps
the pull request head, so upsert-comment-section.sh still finds it at
HEAD_SHA.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 22:20:26 +11:00
Zakk 73825717ea scripts: leave the target's own license out of the autounmask report
The emerge-on-pr comment listed package.license for the target of every
pull request under a restrictive license, such as all-rights-reserved
for app-admin/1password, although a user installing such a package
accepts its license on purpose. The target's own package.license entry
is now left out like its keyword entry, and the license entries of its
dependencies stay in the report.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 22:20:26 +11:00
Zakk 309a06815a scripts: block new BadWhitespaceCharacter findings
Gentoo CI's pkgcheck2html.conf.json rates BadWhitespaceCharacter "err",
while pkgcheck rates it warning, so a pull request could add a
non-breaking or full-width space to an ebuild and pass the report job.
The keyword now joins GENTOO_CI_ERRORS.

UnknownLicenses and MovedPackageUpdate, which Gentoo CI also rates
"err", stay out: they come from the repository-level LicenseGroupsCheck
and PackageUpdatesCheck, which the package scan of the report job never
runs.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 21:02:32 +11:00
Zakk 7b37d842bf .github: fix and extend the emerge-on-pr QA checks
The gentoo-zh binhost carries binpkgs of overlay packages, so the
onlydeps step resolved the target as a binpkg and skipped its build
dependencies, and the package step then built them from source and
failed on their QA elog. The onlydeps step of emerge-on-pr and tatt now
passes --usepkg-exclude for the target, as tatt and tinderbox-cluster
do in their own build steps.

The report steps move into scripts/emerge-report.sh, one subcommand per
step:

- check fails only on the target's own QA or ERROR elog. Dependency
  elog is listed in the comment and does not fail the job. Portage's
  Atom matches the category/pf of each elog file to the target.
- save lists the package.* entries that autounmask added since the
  snapshot taken before the onlydeps step, because a user has to add
  them by hand.

A new step unmerges the target, so pkg_prerm and pkg_postrm elog is
checked too, and both emerge steps pass --backtrack=300, as
pkg-testing-tools does.

pkgcheck-new-findings.py rates BadKeywords, MissingLicenseRestricts,
UnknownManifest and VisibleVcsPkg as errors, as Gentoo CI's
pkgcheck2html does.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 20:53:10 +11:00
Zakk f9717dd2ad scripts: keep the pkgcheck comment to the findings it quotes
pkgcheck-comment.sh runs from master with a token that can write
comments, but takes the commit, the package names and the findings from
the report that the pull request's own run produced. A finding
description with a newline and six backticks closed the code block it
was quoted in, so a pull request could add any Markdown, link or
mention to the bot comment.

The commit and package names now keep only atom characters, as
emerge-elog-comment.sh does with its artifact fields. Each finding has
its control characters replaced by spaces and is cut to 300
characters, so it stays one line inside its code block.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 20:46:05 +11:00
Zakk 06cf3c541b .github: report emerge elog in the pull request comment
The emerge job failed on any saved elog, so warn elog from eclasses,
such as CONFIG_CHECK without kernel sources in the CI container, failed
pull requests whose package was fine. The job now fails only on QA and
error elog. Portage also saves log elog now, and every target's elog is
uploaded and reported in a new section of the pkgcheck report comment,
so reviewers still see the warnings and post-install notes. When
dependency resolution or the emerge fails, the section shows the last
lines of its output, because the elog alone does not show the cause. The
build.log of each package that failed is uploaded as an artifact and
linked from its row.

pkgcheck-comment now also handles the requested event of pkgcheck and
emerge-on-pr, so each section shows that its run is in progress, and
removes the elog section when a push leaves no emerge targets. Because
runs of both sections and of older pushes edit the same comment at once,
upsert-comment-section.sh writes only while the pull request head is
still the run's commit, and reads the comment back to write again when
another run overwrote its section.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 09:34:26 +11:00
Zakk d42a62a2fa scripts: rework the pkgcheck report comment
Compare findings without the version, so a finding that a bump carries over from the
previous ebuild is no longer reported as new. Group new findings by level and list
the existing ones, because a flat list did not show which findings break the package.
Fail the report check on a new error-level finding. Mark the scan unfinished when
pkgcheck fails, which previously read as a clean report, and scan with --config no,
because the exit keywords in metadata/pkgcheck.conf made a NonexistentDeps finding
look like a failed scan.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-22 09:34:26 +11:00
Zakk 86fafae4c9 overlay.toml: keep antigravity's icon pin, autobump 1password, stop liblol
Pass ICON_COMMIT to the engine as a static pin, because the icon is fetched at a fixed commit and would otherwise escalate every antigravity bump.
Turn autobump on for 1password, because engine commit 29b4088 removed the acct-group limitation its comment named.
Turn it off for liblol, because KEYWORDS="-* ~loong" means the amd64 build gate can never install it.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-21 19:26:54 +11:00
Zakk 4157cddb9c scripts/autobump.md: describe when a PR opens as a draft
Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-21 08:48:14 +11:00
Zakk dcb73966ce scripts/autobump-sweep.py: say why an opened PR is a draft
autobump-rb now prints the reason after opening a draft PR, such as
"only amd64 was built". Copy it into the issue's status comment, so
whoever reads the issue sees why the PR waits for review.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-21 08:48:14 +11:00
Zakk d09a49ff02 .github: check commit rules and the PR template in pr-rules
Contributors delete the template, so reviewers cannot see whether
pkgcheck ran or AI was used. The boxes stay optional because not every
contributor can run pkgcheck with --net and the AI box applies only when
AI was used. The autobump bot does not fill in the template and is
skipped.

The commit rules move from pkgcheck into the same workflow, because both
checks read the pull request rather than the ebuilds and must rerun when
the description is edited, which pkgcheck should not.

pkgcheck-comment now also closes a pull request without the template,
and its reply lists the commit and template problems in separate
sections.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 05:45:11 +11:00
Zakk 3b3edd4462 .github: use one naming and formatting style across workflows
Workflow names now match their file stems, so the Actions list and the
files read the same; generate-deps-relation-r1.yml becomes
deps-table.yml after the branch it maintains. Steps are lowercase and
verb-first, every step is named, and the autobump-rb checkout has one
name everywhere.

Also use 4-space step indentation, fromJSON, bare if: expressions,
github.actor for every ghcr login, uppercase env names, and the
GITHUB_REPOSITORY and GITHUB_REPOSITORY_OWNER variables the runner
already sets instead of REPO and OWNER copies. No behaviour changes.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 04:30:43 +11:00
Zakk 0ebff6fd8e .github, scripts: drop dead code and stale comments
AUTOBUMP_JUDGE is set nowhere, so every escalation already goes to a
human; remove autobump-judge.sh and the judge path in
autobump-sweep.py, whose only other entry, the --accept-surface retry,
ran on a judge verdict alone. Behaviour with the variable unset is
unchanged.

Also drop debug output (echo pkgs, targets, cat make.conf), the 130
exit branch that only renamed the generic one, the unused
AUTOBUMP_STATUS_BACKOFF override, and comments that described the
shell autobump-sweep.py replaced or named the wrong caller.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 04:26:16 +11:00
Zakk 8900587f7b .github: narrow token scopes and fix silent CI failures
Jobs inherited write scopes they never use, so each workflow now
defaults to contents: read and grants pull-requests: read or
packages: write only to the jobs whose GITHUB_TOKEN calls need them.
The autobump bump job keeps its own block.

Failures that read as success now fail the step: a failed gh call in
nvchecker-check.py no longer reads as "no issue" and opens a duplicate,
and fleet-keeper no longer reports "found 0" when listing repositories
or workflows fails.

emerge-targets.sh took =cat/foo-bar-1.0 for a version of cat/foo, so a
PR touching both dropped cat/foo; only a digit after the dash starts a
version.

setup-gentoo added the x86-64 binhost on arm64 as well; it is now
added on amd64 only.

mirror-to-codeberg trusted whatever ssh-keyscan returned while holding
a write key; the host key is now pinned and checked.

stage3 cleanup ran even when build was skipped on a fork schedule.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 04:26:16 +11:00
Zakk b598d725b8 .github: check the commit rules as a pull request job
pkgcheck-comment closes a pull request only after pkgcheck has finished,
and its check is not attached to the pull request, so a maintainer could
merge before it ran. A commits job in pkgcheck fails on the same rules
and can be required before merging. Both read the rules from
scripts/commit-rules.sh.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 04:01:09 +11:00
Zakk d2a85360de .github: run CI in a stage3 image updated daily
gentoo/stage3 is rebuilt weekly, but the tree drops old versions within
days, and emerge cannot rebuild an installed package the tree no longer
has. #14578 failed on such a slot conflict: the desktop images carry
kwindowsystem-6.27, bound to qtbase 6.11.1, and the tree starts at 6.29.

stage3.yml updates every installed package of each profile from the
binhost daily and pushes ghcr.io/<owner>/stage3:<profile>; a failed build
keeps the previous image. emerge-on-pr and tatt run in it, and
autobump-env builds on the amd64-desktop-openrc one.

needs-perl-update.sh only covered the same lag for perl, so it goes.
2026-10-11 00:50:45 +11:00
Zakk ed7fcfd120 .github/workflows/nvchecker.yml: write repos.conf instead of eselect repository
eselect repository downloads repositories.xml from api.gentoo.org first.
On 2026-10-09 the runner resolved that host to IPv6 addresses only, could
not reach them, and the eix job failed before any check ran. Neither repo
needs the list: write their repos.conf entries directly and drop
app-eselect/eselect-repository from the job's dependencies.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-10 04:22:41 +11:00
Zakk b885f35b7a scripts: mark an unfinished pkgcheck scan instead of a finished one
pkgcheck-comment runs master's scripts, but the artifact comes from the
pull request's merge ref, which can predate the change that added the
complete marker. Such an artifact was reported as a scan that did not
finish (#14536). Stage now writes an incomplete marker when the scan did
not finish, so an artifact without either marker reads as before.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-09 11:32:47 +11:00
Zakk fac5b38dec scripts: keep autobump from skipping issues and refusals silently
- select_issues: fetch up to 1000 open issues. The 200 limit now counts every
  open issue before the [nvchecker] title filter, so more open issues would
  push nvchecker issues out of the window.
- run_worker: annotate an item that raised, such as a missing bundle snapshot,
  with ::error so the skipped bump shows on a green run.
- find_status_comment_id: match only bot comments, and take the first id
  because --jq prints one per page with a match.
- autobump-trial.sh: skip a target whose overlay.toml entry autobump-args.py
  refuses instead of building it with default flags.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-09 11:10:14 +11:00
Zakk 471c387b74 scripts: stop the pkgcheck report from passing unfinished or hidden findings
A failed `pmaint sync` or `pmaint regen` left empty report files, and the
comment counted zero new findings and posted good. The scan now leaves a
complete marker and the comment reports a scan that did not finish.

New findings were keyed by package, keyword and version, so a second
finding of the same keyword in an existing version was taken for the old
one. They are now compared by their message without line numbers, counted
as a multiset.

The marker lookup only takes comments written by a bot, so a user comment
that quotes the marker is not edited.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-09 11:09:43 +11:00
Zakk afb88a7577 .github/workflows: start autobump without the one-minute wait
The wait job slept 60 seconds because the issue search index lags issue
creation. The sweep now lists open issues without --search and keeps the
[nvchecker] titles with jq, so a new issue is listed at once and plan
carries the nvchecker gate itself.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-09 10:15:25 +11:00
Zakk 23dabd3139 scripts/autobump-sweep.py: report missing per-version bundles
The bundle controller now also sees opted-in packages without a bundle key, and a transient 404 on a per-version deps artifact is listed under waits in the shard delta, so autobump-wait can wait for that artifact instead of the next scheduled run.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-09 10:15:25 +11:00
Zakk 2c552a6c56 scripts/needs-perl-update.sh: update perl when the binhost index fails
When emerge --pretend cannot fetch a binhost index, it resolves the
target against ebuilds only. The perl modules then stay on the
installed perl, the output names no dev-lang/perl, and the script
reports that no update is needed. The later `emerge --onlydeps` fetches
the index, pulls dev-lang/perl 5.44 binpkgs against the stage3's perl
5.42 and fails with a slot conflict.

That happened to =app-text/imewlconverter-9999 on amd64-desktop-openrc
in run 37817036593: its `emerge --onlydeps` step printed no "[gentoo]
Local copy of remote index is within TTL" line, while the other jobs of
the same run did, and the systemd job of the same atom updated perl.

Exit 0 when the output reports "Error fetching binhost package info",
so an unknown answer costs a perl update instead of a failed job.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-09 05:28:13 +11:00
Zakk bb2d857264 autobump.yml: give each package a fresh worker
Shared checkouts left later packages waiting on tracked modifications. Give each
attempt its own job while retaining eight concurrent workers. Cap planned attempts at
the matrix limit, including explicit issue lists.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-07 01:54:03 +11:00
Zakk 46d0513c78 .github/workflows/nvchecker.yml: skip new versions Portage cannot parse
nvcmp --sort portage raises TypeError on a new version that Portage
cannot parse. On 2026-10-04 the tag mobile-v0.1.5 failed the whole job,
so the job opened no bump issue for any package.

scripts/nvchecker-check.py restores the old version of such an entry,
so nvcmp still compares the other packages, and opens one issue per
package and version that CCs the package maintainers. It also prints a
warning for each package whose upstream returned no version.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-05 20:35:32 +11:00
Zakk 4ac63a2a18 scripts/autobump-sweep.py: assign the issue while a bump runs
The sweep adds AUTOBUMP_ASSIGNEE (gentoo-zh-bot by default) to the issue
before it runs the engine, so the issue list shows which versions autobump
is already working on. The assignment stays when a PR is opened and is
removed after an escalation, a deferral or a crash.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-04 16:18:03 +11:00
Zakk e112002acb scripts/needs-perl-update.sh: unmask keywords for live ebuilds
A live ebuild has empty KEYWORDS, so `ACCEPT_KEYWORDS="~amd64"` alone
leaves it masked. emerge --pretend then prints no dependency list,
needs-perl-update.sh reports that perl is not needed, and the workflows
skip the perl update step. The later `emerge --onlydeps` then pulls
dev-lang/perl 5.44 binpkgs against the stage3's perl 5.42 and fails with
a slot conflict on dev-perl/Error and dev-vcs/git[perl].

Pass `--autounmask=y --autounmask-continue=y`, as the emerge steps
already do, so the keyword unmask is applied in memory and the
dependency list is reported. A target that does not need perl still
reports none.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-02 19:43:46 +10:00
Zakk a8f4957b99 .github: update perl when the target pulls perl modules
The stage3 images can ship an older dev-lang/perl than the one the
binhost builds perl modules against. A target that pulls a new perl
module then schedules the newer perl while installed modules keep the
old one, and emerge stops on a dev-lang/perl:0 slot conflict.

When the target's dependencies would replace dev-lang/perl, update it
from the binhost first, then run `perl-cleaner --all` to reinstall the
modules built for the old perl, as the Gentoo perl upgrade news item
recommends.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-02 08:51:19 +10:00
Zakk 756d956d1e .github/workflows: trim comments, drop autobump-selftest
Long inline shell and repeated explanations obscure the job sequence.
The engine already has its own selftest.

Because one failed issue update must not cancel the others, disable
matrix fail-fast. An empty eix result must produce an empty package map.
Pin the push action because the dependency-table job grants it write
access.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-02 01:54:16 +10:00
Zakk 5cefccb26c .github/workflows: move trial and pkgcheck comment logic into scripts
Because the engine returns to master, restore the dispatched ref so
every trial target uses the selected scripts. Reuse the worker image
because it already supplies the trial setup and tools.

A skipped report job leaves no artifact, so skip its download and comment
instead of failing the comment workflow. Select a marker across all
comment pages because per-page lookup can return several comment IDs.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-02 01:54:16 +10:00
Zakk a12c7f8d37 .github: share Gentoo setup and changed-package detection
The repeated stage3 setup obscures the package tests.

Because gh pr view stops at 100 files, use every API page so large PRs
test every changed package. Match ignore prefixes literally because
regex metacharacters also exclude unrelated paths.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-02 01:54:16 +10:00
Zakk 6fced8485a .github/workflows: give CPU flags only to packages that need them
emerge-on-pr and tatt gave the runner's CPU flags to every target, and autobump and
autobump-trial to every package through */*. A package with optional flags, such as
dev-util/opencode-bin or sci-ml/llama-cpp, was then tested only in its runner
variant, never in the baseline one most of its users get, and in autobump a
dependency with such flags would no longer match the binhost's USE and would be
built from source.

Each workflow now tries the package with the baseline flags first and writes the
runner's flags only when its REQUIRED_USE is unsatisfied, as for dev-util/hunk-bin
and dev-util/oh-my-pi-bin. The check accepts all keywords and licenses, because a
masked package does not report its REQUIRED_USE.
The four workflows share the check in scripts/needs-cpu-flags.sh.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-01 15:54:24 +10:00
Zakk 0b26e19d66 .github/workflows/autobump.yml: prepare vendor bundles before bumping
nvchecker dispatched gentoo-deps bundles as soon as it saw a new version, but
autobump could reach the bump before the bundle was released; the 404 then ended as
an escalation or used up the transient retries.

The plan job now runs the bundle controller, autobump-rb's bin/bundles.py, for every
open issue whose package has `deps` or `bundle` in overlay.toml, opted in or not. It
dispatches a missing bundle at most three times per bundle and version, holds the
package back until the bundle is ready, and escalates after four observations. The
engine reads the snapshot through --bundle-status to tell a pending bundle from a
wrong file name.

`deps` names the gentoo-deps generator language, from which the controller derives
the repository, workflow, release tag and inputs; a producer with its own workflow,
as in gentoo-zh-drafts, takes the full `bundle` form. bundles.yml runs the same
controller to check or prepare a package's bundles by hand.

The nvchecker dispatch job and gentoo-deps-dispatcher.toml are removed, so only one
path dispatches bundles.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-01 01:16:59 +10:00
Zakk 956f131a1f scripts/autobump.md: correct the start delay and the 404/403 outcome
The workflow waits 60 seconds after nvchecker, not 5 minutes, and now
starts after any nvchecker run that was not cancelled. The engine
escalates a distfile that upstream answers with 404 or 403 instead of
deferring it, so it no longer belongs under defer.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-01 00:58:52 +10:00
Zakk 7919e603eb scripts/autobump-sweep.py: count the attempts of a rerun
A rerun keeps GITHUB_RUN_ID and changes only GITHUB_RUN_ATTEMPT, so its
attempt lines matched the first run's, collect dropped them as
duplicates and the transient cap did not advance. A rerun's attempt now
carries its attempt number; a first attempt writes the same token as
before.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-01 00:58:52 +10:00
Zakk c856da9f2d scripts/autobump-sweep.py: keep the full escalation reason
The reason pattern stopped at the first ")", so a reason carrying its
own parentheses reached the issue cut short, e.g. "(404/403". The
engine closes the reason with "); evidence: <dir>", so match up to
that instead.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-01 00:58:52 +10:00
Zakk 838a543e5a scripts/autobump: state what each autobump value keeps
The guides said N keeps the N most recent old versions and that true keeps
none, but N counts the new version, so 1 drops every old version, and true
drops only the version the new one replaces. Say so, note that 0 acts like
true, and word the issue status line the same way.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-09-30 12:54:51 +10:00
Zakk e4a8f0336d workflows: drop autobump-recommend
Since it started on 2026-07-19 the list in #11143 has not led to a single
opt-in: every autobump toggle in overlay.toml since then followed a manual
bump, and its longest-standing recommendation (app-admin/qm, 5/5
mechanical) is still bumped by hand. Its judgement is off too: it called
fcitx-skk 5.1.11 mechanical, and that bump needed a patch rebase and a
fcitx dependency bump. Section C has been empty every week. That is a
gentoo container every Monday for a list nobody acts on.

autobump-discover.sh and autobump-probe.sh had no other caller.
autobump-trial.yml stays: it is the manual "prove it builds before opting
in" tool and does not depend on this.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-09-14 10:59:15 +10:00
peeweep a3b81b2173 scripts/__pycache__: clean
Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
2026-09-05 19:04:34 +10:00
Zakk 297d476743 autobump: retry issues the ledger already recorded
An escalation records the bump as done, and DONE is keyed by version, so a fix in
the engine only reaches the package on its next release. --retry runs the named
issues again; it needs their numbers, so a re-run cannot sweep the whole queue by
accident.
2026-09-05 17:07:49 +10:00