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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
Portage names an elog "<cat>:<pn>-<ver>:<timestamp>.log". GitHub refuses a colon in
an artifact path, so the upload step failed and took a finished bump's job red with
it - the bump itself had already succeeded. The copy replaces the characters an
artifact cannot carry, and the upload no longer fails the job: evidence is for
reading afterwards.
The run limit does not cap issue numbers given by hand, the two-hour ceiling is per timed
operation rather than per package, and a trial reports DEFER as well as PASS and FAIL.
A trial's engine reaches pkgdev commit even without --pr and neither trial job set an
author, so a candidate that built cleanly reported FAIL. Neither derived CPU_FLAGS_X86
either, so a package with a cpu_flags_x86 REQUIRED_USE looked unbumpable to the trial and
bumpable to the sweep. The trial upserts a status comment per issue with an issues:read
token, which GitHub rejects and the helper swallows; the probe read the first 30 issues of
a queue it says it reads whole; and discovery told maintainers to opt a keep-old package
in with the one value that drops the versions it keeps.