Skip to content

Phase 3: model review on open-weight models - #37

Draft
thomas-roos wants to merge 200 commits into
moto-timo:mainfrom
thomas-roos:phase3-model-review
Draft

thomas-roos wants to merge 200 commits into
moto-timo:mainfrom
thomas-roos:phase3-model-review

Conversation

@thomas-roos

@thomas-roos thomas-roos commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Model review for bodnuti: an open-weight model, self-hosted or hosted, looks at each patch for what no fixed check can see, and shows only what it can back with a quote. Alongside it, every rule a fixed check can decide became a check. Draft; designs in designs/PHASE3.md and designs/PHASE4.md, every check with its test in docs/CHECKS.md.

Why

bodnuti's checks see form; maintainers also send patches back for logic: a flag that reaches native builds, a macro the compiler never sets, a backport whose tests miss an import. The goal: no false finding shown, finding what maintainers find, on hardware we own. The rule: what a fixed rule decides cheaply is a check; the model only judges what needs the code understood.

Design

Step What Model?
Checks patchtest, oelint-adv with bodnuti's own rules, shellcheck, ruff on the layer's Python, bodnuti's checks; on the host, checks that need the network no
Skip reviewed before (same patch-id, same model), a plain version bump with upstream's build files unchanged, dropped patches no
Facts in the no-network check container or from hosts the layer already uses: touched files, require/inherit, git grep, docs, BitBake's final values before and after the patch and without each distro feature the recipe tests for, the upstream commit a Backport names compared hunk for hunk, a Submitted request's code, what an upgrade changes in upstream's build files no
Model one seeded pass per patch, no tools; a finding is dropped if its file, line or quote is not in the request, if it restates a check, or below medium confidence yes
Check pass each finding asked again with the review rules and read-only tools; shown only if confirmed with a quote; refuted is the default; never counted yes

Everything from a patch is untrusted: the model's answer like mail, paths kept inside the tree, nothing through a shell. BitBake parsing runs the patch's Python, so only in the check container (no network, no secret, read-only) or under bwrap.

Checks

bodnuti's own oelint-adv rules (assets/oelint/bodnuti_rules/)

Each tried on merged OE-Core recipes first; what fired on accepted practice was left out or made a style note.

Id Reports Severity
bodnuti.pv PV contradicts the version in the recipe's file name (python3-construct_2.10.70.bb with PV = "1.0+git") warning
bodnuti.pv-redundant PV repeats the version the file name sets warning
bodnuti.cve-tag a carried patch named for a CVE whose CVE: tag names another (libinput, 2025 for 2026) warning
bodnuti.backport-hash a Backport URL with a commit hash of 13 to 39 digits: cut off (curl) warning
bodnuti.features-check REQUIRED_, ANY_OF_ or CONFLICT_DISTRO_FEATURES (or _MACHINE_) without inherit features_check warning
bodnuti.github-archive SRC_URI fetches a GitHub /archive/ tarball warning
bodnuti.license-spdx an old license name (GPLv2, BSD, Apache-2) instead of an SPDX identifier warning
bodnuti.python2 inherit pythonnative, or python/python-native in (R)DEPENDS error
bodnuti.overridable-defaults PACKAGECONFIG set with =, += or :append in a recipe, where a distro cannot override it warning
bodnuti.tool-depends a build tool a class brings in DEPENDS (pkgconfig, cmake-native, python3-native, target gettext or python3-setuptools) warning
bodnuti.bash-rdepends bash in RDEPENDS:${PN} warning
bodnuti.devtool-leftovers the Committing-changes-from-do_patch patch or the License-Update example comment of devtool upgrade warning
bodnuti.sysroot-paths ${RECIPE_SYSROOT}/usr, ${STAGING_DIR_*}/usr or ${D} in EXTRA_OECONF, _OECMAKE, _OEMESON warning
bodnuti.glibc glibc, glibc-dev, glibc-utils or glibc-gconv-* in a dependency without a :libc-* override error
bodnuti.systemd-units do_install installs a unit file in a recipe that does not inherit systemd warning
bodnuti.cve-version CVE_VERSION repeats the version warning
bodnuti.pending-submitted a carried patch says Pending but its header links a pull request, merge request or lore post warning
bodnuti.packageconfig-fields a PACKAGECONFIG[x] with the same option in both arms, or more than six fields error
bodnuti.backport-source a Backport whose URL is a distribution's (Debian, Fedora, SUSE...), or that names no commit or version at all warning
bodnuti.srcuri-duplicate SRC_URI naming an entry twice, or giving a parameter twice warning
bodnuti.srcuri-missing-file a file:// in SRC_URI with no such file in FILESPATH's directories beside the recipe error
bodnuti.native-paths a *_native path variable in EXTRA_OE* of a target recipe warning
bodnuti.git-tag a git URI in a release recipe without tag= style
bodnuti.packageconfig-auto a PACKAGECONFIG flag with an empty enable or disable side (orc's hotdoc) style
bodnuti.conditional-patch a carried patch applied only under an override or condition style
bodnuti.sed-build-files sed -i on configure, Makefiles, CMakeLists.txt or meson.build style
bodnuti.strip-reason INHIBIT_PACKAGE_STRIP, _DEBUG_SPLIT or INHIBIT_SYSROOT_STRIP set without a comment above it style

bodnuti's checks in Rust

Id Reports Test
bodnuti.apply the series does not apply to the branch it targets publish::tests::an_apply_failure_of_a_landed_patch_is_not_a_finding
bodnuti.metadata.line-length an added line over 200 characters, as patchtest metadata::tests::reports_the_long_line_patchtest_failed, a_wrapped_line_is_fine
bodnuti.metadata.license-update a changed LIC_FILES_CHKSUM without License-Update: in the commit reports_the_license_change_patchtest_failed, a_license_update_tag_explains_the_change, a_changed_checksum_on_a_continuation_line_counts, a_new_recipe_or_a_moved_value_is_not_a_change
bodnuti.metadata.cve-check-ignore an added CVE_CHECK_IGNORE after kirkstone reports_added_cve_check_ignore, kirkstone_and_dunfell_still_use_cve_check_ignore
bodnuti.metadata.version-lowered a recipe renamed to a version that sorts lower (as dpkg compares) with no PE in the change; reverts excepted metadata::tests::a_lowered_version_without_pe_is_reported, versions_compare_as_dpkg_does
bodnuti.metadata.placeholder-identity a From: or Signed-off-by: in a carried patch with a placeholder identity (@example.com, root@localhost, OE Builder) metadata::tests::a_carried_patch_names_people
bodnuti.srcuri.leftover-file a patch file dropped from SRC_URI but left in the layer srcuri::tests::*
bodnuti.bitbake.parse with BODNUTI_BITBAKE, a recipe that no longer parses after the patch bitbake::tests::a_changed_value_shows_what_it_was (the rendered error)

Checks that need the network (on the host, --offline skips them)

Id Reports Severity
bodnuti.upstream.backport-unreleased a Backport of an upstream commit no release tag contains: Accepted, not Backport (bluez5, libjitterentropy) warning
bodnuti.upstream.submission-merged a Submitted pull or merge request upstream has merged: Backport of its commit warning

When a check changes, report::CHECKS goes up and the watcher checks open series again, twelve a run.

Review rules for the model (45)

In plugins/bodnuti/skills/yocto-review-rules/rules/, shared with the Claude Code plugin; condensed from maintainers' inline comments 2016–2025, each with quotes and a "do not report when". 24 of the original 69 left the prompt because a check decides them; a rule that mixed a fixed test with judgment kept only the judgment.

  • ASSIGN-1 = wipes values set by a class, an .inc or the defaults
  • BB-1 Local files in SRC_URI are found, applied and need no checksum
  • BB-2 Variables from bitbake.conf and the classes are always set
  • BB-3 Inline Python and prefuncs work in shell tasks
  • BB-4 PACKAGECONFIG carries its own dependencies
  • BB-5 A carried patch is a diff inside a diff
  • BB-6 An append to a Python function needs no python keyword
  • BB-7 The git fetcher unpacks into ${BP}
  • BB-8 % in a bbappend name matches any version
  • BB-9 Python functions have bb, os, d and oe without an import
  • BUILD-1 Fix the cause, not with flags that hide it
  • BUILD-2 Scope a workaround to exactly the configurations that need it
  • BUILD-4 Anchor patterns so they match only what is meant
  • CL1 Hard-coded library or prefix paths
  • CL2 Override syntax used where it does not apply
  • CL3 Dependency for an optional feature added unconditionally
  • CL4 Acting on a path that may not exist
  • CL5 A new variable that duplicates an existing one
  • CVE-2 CVE_PRODUCT and CVE_VERSION must match NVD and follow PV
  • DISTRO-1 A hard dependency on a feature-gated recipe needs features_check
  • DISTRO-2 systemd support follows DISTRO_FEATURES, best via the systemd class
  • LIC-2 LICENSE must match the source
  • PY1 A boolean variable tested as a plain string
  • PY2 Substring match where a prefix, suffix or exact match is meant
  • PY3 Shell command strings where a list or direct file I/O works
  • QA1 Test leaves state behind or uses a fixed path
  • QA2 Test asserts on incidental details
  • PKGCFG-2 Each knob passes both an enable and a disable option
  • PKGCFG-3 Fields in the wrong position
  • PKGCFG-4 Optional features go in PACKAGECONFIG, not hard DEPENDS or options
  • PKG-1 Splitting a package must keep what the old package installed
  • PKG-3 Test-only build changes are gated on ptest
  • PH3 Pending although the patch was already submitted
  • PH4 Backport that is not an upstream commit, or has no location
  • PH5 Inappropriate on a fix upstream would want
  • PH6 Pending on a change only OE would carry
  • PH7 Dead upstream not marked Inactive-Upstream
  • PH8 Authorship changed or sign-offs forged or removed
  • PH9 Generic fix left as Pending
  • PH10 Patch carries changes unrelated to its purpose
  • SRC-3 Do not apply patches conditionally
  • TS1 Hard-coded library directories
  • TS2 run-ptest that can hide failures
  • TS3 Values that go stale on the next upgrade
  • TS4 Not a defect: the kernel's uevent carries PARTNAME

Where it stands (30 November)

Self-hosted: Qwen3.8-27B on a 16 GB GPU, medium reasoning, seed 1.

  • Judge set (14 findings with known truth): all 10 false findings refuted, also with the current bodnuti; it now shows python3-construct; orc is refuted by the model but caught by bodnuti.packageconfig-auto.
  • Real defects with every check clean, found by a local model: clang's -target reaching native builds (maintainers asked for a v2), igt-gpu-tools testing defined(x86_64), python3-pillow backport tests missing imports.
  • Live: bodnuti.upstream.backport-unreleased on bluez5 (wrynose): a Backport of a commit no bluez release contains yet.
  • Cost: about 21 minutes a patch locally, up to a fifth skipped; hosted GLM-5.3 about a minute and $0.03 a patch.
  • xhigh reasoning gave the same verdicts at 1.6× the time; a trained LoRA found nothing (stopped).

Live preview: https://thomas-roos.github.io/bodnuti/

Next

  1. Replays with the current bodnuti (running): what the new facts change.
  2. A hosted comparison on the same patches, if tokens allow.

🤖 Generated with Claude Code

bodnuti contributor and others added 30 commits November 25, 2026 21:32
DESIGN.md 6 planned layers 3 and 4 on the Claude API, with the model
left as an open question. The decision now is to use open-weight models
only, which the worker cannot run itself: a 20-30B model needs 18-24 GB,
and the worker has 4-8 GB.

Add PHASE3.md: an OpenAI-compatible endpoint, either a model host on the
private network or Hetzner's free Inference API experiment, which ends on
8 December 2026 and so serves the measurement rather than production.
Layer 2 context is gathered in the sandboxed check container, layer 3 is
one schema-constrained call per patch, and layer 4 escalates to a larger
model with read-only tools, within a budget of about 170 patches a day.
Point DESIGN.md 6.7 and open question 5 at it.
PHASE3.md 8 decides the layer 3 model by measurement before layers 3
and 4 are built, and Hetzner's free Inference API, which can run that
measurement for both candidate models, ends on 8 December 2026.

Add bench/phase3/score.py: it builds the layer 2 context for each
benchmark commit from git objects, makes one schema-constrained request
per patch to an OpenAI-compatible endpoint, applies the 5.3 validation,
asks a judge whether a finding names the known defect, and reviews
recent clean commits for false positives. It uses the standard library
only and is not part of the bodnuti binary.
PHASE3.md 1.1 made Hetzner's free Inference API the measurement
endpoint, but that experiment ends on 8 December 2026, and FriendliAI,
which can sponsor the measurement, does not serve the two Qwen models
the design named.

Generalize 1.1 to hosted open-weight endpoints: FriendliAI serverless
for measurement and, if the numbers and cost hold, production, with
GLM-5.3-Flash and gemma-4-31B-it as the models measured and their
per-token price set against the DESIGN.md 6.3 budget; Hetzner as an
alternative until it ends; the model host as the fallback. Update 8,
the open questions and the DESIGN.md 6.7 pointer to match. The
decisions and the 7 configuration are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model review (PHASE3.md 4) needs, for each patch, the files it touches,
what they require and inherit, where the names it changes are used, and
the previous version of an upgraded recipe. Only the check container has
the patched tree, and nothing that reads patch content may have network
or a route to the model.

Add the context module, a port of gather() in bench/phase3/score.py,
and a --review-context flag on check that puts one context object per
applied patch into the JSON report, the way findings and excerpts
already leave the container. Files are read from the commit git am made,
by path normalized inside the tree, and symlinks, submodules and paths
that climb out of the tree are skipped. Names reach git grep after -e,
never through a shell. Each file is cut at 12 KiB on a line boundary
and a patch's context at 48 KiB, with what was left out recorded. On
three benchmark commits the items and the dropped lists match the
bench.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layer 2 context now leaves the check container, but nothing sends it to
a model, so no patch is reviewed (PHASE3.md 5).

Add the review module and a [review] table in watch.toml. When it is
set, each check gathers the context, and the poll queues each patch in
state/review/queue/ unless its patch-id was already reviewed, then
after checking makes one request per patch, oldest first, for at most
review_minutes: temperature 0, no tools, the fixed prompt and guides
first so the server can cache the prefix, then the context in untrusted
blocks and the layer 1 findings. It asks for a JSON schema and falls
back to json_object on HTTP 400; a 429 leaves the rest queued, another
failure or an answer outside the schema is retried once and then marked
not reviewed, and a patch waiting over three days is skipped. Findings
naming a file or line the request did not have, or restating a layer 1
finding, are dropped, and messages are cut at 500 characters. Model
findings are Tool::Llm and kept apart from the report. The key is read
from a file only its owner can read and is never logged. Document the
worker's outbound 443 to the endpoint and the key file in DEPLOY.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model reviews are stored per patch, but the series pages do not show
them (PHASE3.md 9).

Under each patch's deterministic findings, add a collapsed "Model
review" section naming the model, marked as found by a model, not
verified and not counted, with each finding's severity and confidence,
or "not reviewed" or "skipped" with the reason. Show the model's
explanation of a layer 1 finding inline under that finding. All model
text is escaped like mail. Reviews are read beside the report, so the
result line and the exit status do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model review only runs in the watcher, on series already on a list, but
its main use for a developer is before a series is sent (PHASE3.md 7).

Add --review to check: it gathers each patch's context and reviews it
with the [review] settings of --review-config, watch.toml by default,
or with --review-endpoint and --review-model, for example a developer's
own Ollama. An endpoint other than the file's is sent no key. The
reviews appear in the text and JSON reports, marked unverified, and do
not change the exit status. README.md documents it and warns that an
unsent series goes to the endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GLM-5.3-Flash on FriendliAI ignores chat_template_kwargs.enable_thinking
and, at its default effort, can spend all 8192 output tokens reasoning
and return no content, which the harness scored as a patch with no
findings.

Add --reasoning-effort, sent as reasoning_effort, which FriendliAI's
GLM models honour (none turns reasoning off), and say on stderr when an
answer was cut at max_tokens before any content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reasoning model that spends all of max_tokens thinking returns no
content, and the review reported only "no message in the answer". The
only reasoning control was enable_thinking, which GLM-5.3-Flash on
FriendliAI ignores.

Add a reasoning_effort key to [review], sent as reasoning_effort and
checked against the values the API defines, and report an answer cut
at max_tokens as such, with the hint to lower the effort.

Fixes: 62d1313 ("review: one model call per patch")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PHASE3.md 8 decides the layer 3 configuration by measurement, and the
first runs on FriendliAI's serverless API are done.

Add a STATUS.md section with the results for gemma-4-31B-it,
GLM-5.3-Flash and GLM-5.3 at two reasoning settings each: defects found
by the judge and on a first reading, findings on 25 clean commits
sorted into real, plausible and false, tokens and cost. No setup meets
the proposed bar yet; GLM-5.3-Flash with low reasoning is the best
trade, and a larger model alone does not reduce false findings. Add the
measured rows to the cost table and the next steps for phase 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six benchmark defects cannot tell 4 of 6 from 5 of 6, and the first
measurement showed most findings on clean commits are false, many of
them confident claims the request does not support.

Add mine.py, which turns OE-Core Fixes: trailers into benchmark entries,
and heldout.json, 30 such defects to score a frozen configuration on.
Add --min-confidence, which drops findings below a confidence as
bodnuti's min_confidence does, and --prompt v2, which asks for an
evidence quote per finding, drops findings whose quote is not in the
request, adds OE-Core facts behind the recurring false findings, and
asks for only what the patch introduces or leaves incomplete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The untrained layer 3 finds only 4-5 of 30 defects mined from OE-Core's
Fixes: trailers and needs filters to keep false findings down, while
the lists hold years of patches reviewers sent back and the v2 that
fixed them.

Add a design draft for a LoRA adapter trained on that history: v1/v2
pairs from the lore public-inbox mirrors as defect examples, patches
merged unchanged as clean ones, labels checked as layer 3 answers are,
a time split, and serving on an OpenAI-compatible endpoint so bodnuti
needs no new code path. Consent, cost, base model and scope are left
for the maintainer to decide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The benchmarks so far are defects found after merging. What layer 3
should match is what list reviewers catch before merging, and the lists'
history records it: a v2 changelog says what reviewers had changed.

Add history.py, which pairs v2 patches with their v1, applies v1 to the
branch as it was when it was sent and writes benchmark entries whose
problem is the v2 changelog, and history-2026.json, 19 such pairs from
2026. Add lessons.py, which distils the rules reviewers keep applying
from code changelogs of an earlier period, its output for 2023 to 2025,
and --prompt v3, which adds those rules to the v2 prompt. Note in the
training design that a trained model gets its own endpoint and that the
learned prompt is the baseline it has to beat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Benchmarks age and every prompt change risks tuning to them, while the
lists answer each review the watcher makes: a patch is revised, merged
unchanged, or merged and fixed later, and the watcher already records
all three.

Add PHASE3.md 11: score each reviewed patch once the list has decided,
matching findings deterministically against the interdiff of its
revision or the files of a later Fixes: commit, and keep monthly hit
rate, catch rate and noise per configuration in state/review/outcomes/,
shown on the site. Open questions move to 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most model findings on clean commits were false, and in the benchmark
nearly all of them were rated below high confidence: keeping only high
took GLM-5.3 from 0.48 to none per clean patch on 25 commits, and to
none on 25 held-out ones, at the same defects found.

Add a min_confidence key to [review], high by default, below which
model findings are dropped in validation and recorded with the reason.
PHASE3.md 5.3 and 7 already describe it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first measurement left false findings above the bar, and the
benchmark was too small to tell configurations apart.

Record in STATUS.md what was tried and how it scored on sets not used
to choose it: the confidence filter, prompt v2 with evidence quotes and
OE-Core facts, the rejected changed-lines filter, and rules learned from
resent patches; the two new test sets, mined Fixes: defects and 2026
v1/v2 reviews; and prompt v2's held-out results, which favour GLM-5.3
with min_confidence medium.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The watcher covers six OE and Yocto lists, but several layers with their
own lore archive are not among them. Of those, yocto-meta-ti (about 26
patches a month), yocto-meta-arm (17) and yocto-meta-arago (9) are
active; poky, yocto, yocto-meta-freescale and yocto-toaster carry almost
no patches.

Add the three lists and their repositories to the example watch.toml in
DEPLOY.md. A dry run lists their series as expected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v1 prompt left GLM-5.3 at 0.16 to 0.48 false findings per patch on
the tuning set. Prompt v2 from bench/phase3 asks each finding to quote
the lines that show it, reports only what the patch introduces or
leaves incomplete, and lists the OE-Core facts behind the recurring
false findings. On the held-out sets it found 8 of 30 mined defects at
0.04 false findings per clean patch with medium and high findings
kept, against 5 and 0.00 for v1 with high only; v3, which adds rules
distilled from the lists, raised noise to 0.28. Validation now drops a
finding whose quote is not in the request, and min_confidence defaults
to medium, since with the evidence rule high lost defects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bodnuti check --review --json writes the report to stdout, and the log
line of each model call went there too, ahead of the JSON, so the
report could not be parsed. The line now goes to stderr, with the other
review messages.

Fixes: 92076ee ("check: --review for a series before sending")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layer 4 of PHASE3.md §6, as a draft. With escalation_model set, a patch
that changes classes, meta/lib/oe or bitbake.conf, fixes a CVE, or gets
a low-confidence layer 3 review goes to the larger model with layer 3's
findings as leads and up to five turns of grep, show and log. The tools
read git objects at the commit git am made of the patch, in the clone it
was checked in: no checkout, filter or textconv, arguments validated as
mail is, output passed back as untrusted data. The check keeps the
applied commits under refs/bodnuti/review/ until the patch is reviewed.
Its result replaces layer 3's and says why it was escalated, or why not.
Each review now also records its prompt version and min_confidence, and
check --review escalates too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PHASE3.md §11, as a draft. After review, each poll looks at reviewed
patches the lists have decided: a later checked patch on the same list
with the same author and summary is a revision, and a model finding
within three lines of a line the interdiff changed counts as
confirmed; a landed patch confirms nothing until a commit with Fixes:
naming it changes a finding's file; after 60 days without either, the
patch is dropped. No model calls, only git on the clones. Decisions go
to state/review/outcomes/patches.json and monthly counts per model,
prompt and min_confidence to <yyyy-mm>.json; the poll logs the current
month. The applied commits now stay referenced until decided, not only
until reviewed, since the interdiff needs them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A day of real list traffic, read by hand, gave 22 false model findings
of 31. Some judged a patch without its series (a bitbake change named
only in the cover letter), several missed an OE fact (HOST is where the
output runs, a backport's From hash is the local commit, vardeps track
oe.* functions, a layer's master builds against OE-Core master, a
refreshed patch file is not the place for what it already lacked), and
one patch got the same finding twice. Each request now carries the
cover letter and the series' subjects, the prompt (now v2.1) states
those facts, and a finding within three lines of a kept one in the same
file is dropped. On one rerun of that day the mix of findings changed
more than their number, so this is not yet shown to help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Answers were capped at 8192 tokens. Local open-weight models on a
laptop or workstation GPU (gemma 4, glm-4.7-flash) often spend more
than that reasoning and then answer nothing, which bodnuti reported as
cut at max_tokens. The cap is now max_tokens in [review], still 8192
by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measuring a local model on the patches a day's findings were about
meant reviewing whole series of up to 18 patches at several minutes
each. --review-patches 2,5 reviews only those patches. Training a model
on bodnuti's own requests (designs/TRAINING.md) needs the request
without a call: --review-requests DIR gathers the context and writes
each patch's layer 3 request, without guides, to DIR/<patch>.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
designs/TRAINING.md, as decided: train locally, the adapter and data
private. train_data.py reads a public-inbox mirror of a list, pairs each
single patch with its next version when the changelog says the code
changed, applies both to the branch as it was, and turns the interdiff
into the answer on v1 (file, line, the changelog as the message); clean
examples are commits merged without a later Fixes:. Each request is
bodnuti's own, from check --review-requests. train_lora.py trains a
QLoRA adapter on them with the loss on the answer only; on an RX 7600
XT, bitsandbytes needs HSA_OVERRIDE_GFX_VERSION=11.0.0. OE-Core and
openembedded-devel from 2016 to 2025 gave 937 examples, about 290 of
them revisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A day of real traffic read by hand gave 22 false findings of 31, most
of which one git grep or file read would have settled, and five more
facts in the prompt changed the mix rather than the number. The new
goal is no false finding shown, on a model that runs on a laptop or
workstation GPU. PHASE3.md section 13 proposes a check pass: each kept
finding goes back to the same local model with the read-only git tools
of layer 4, and is shown only if confirmed. Draft, with two questions
for the maintainer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The local models' false findings came from what they believed about
BitBake and the metadata, not from the patch: a postfunc taken to be
outside its task's signature, signature lines taken for a malformed
patch. The request carried the code but not the manual.

bench/phase3/docs_index.py now indexes the Yocto and BitBake glossaries,
the class reference and the BitBake task flags into one JSON file, and
with docs in [review] or check --review-docs the host adds the entries
for the flags, classes and variables a patch's changed lines name to its
request, at most 8 KiB. The index is data built from the two
repositories, not part of bodnuti.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first dataset took its answers from the author's changelog in v2,
put on every v1 hunk that changed: "v2: update the SRC_URI", "Add SoB
tag", diffstat lines, all with high confidence. A model trained on it
would learn to write changelogs as findings.

train_data.py now takes each answer from a reviewer's inline reply to
v1: the comment below a quoted added line, kept only when v2 changed
code within five lines of it. train_lora.py follows transformers 5
(warmup_steps, apply_chat_template's dict), filters lengths correctly,
and computes logits only from the first answer token on, since Gemma's
262k vocabulary made those of an 8k-token request several GB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Local models reported findings a single look at the tree would have
refuted: a value set in the class, a postfunc taken to be outside its
task. Layer 3 has one call and no tools, and sashiko's own answer to
this, its false-positive guide and verification stage, was not used.

Every request now carries sashiko's false-positive-guide.md and
severity.md, and with verify = true in [review] each finding layer 3
keeps goes to the model once more, with the read-only tools of layer 4
when the applied commit is at hand. It is shown only if confirmed with
a quote that is in the request or a tool's output; otherwise it moves
to dropped with the reason. PHASE3.md §13.1, draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review now sends the docs of what a patch changes, so a model trained
on requests without them would see different requests in use; and
meta-openembedded got only four clean examples, because clean commits
were looked for under meta/ only, which that layer does not have.

train_data.py passes --docs to bodnuti as --review-docs, looks for
clean commits by metadata file type in any layer, and drops a
reviewer's sign-off name and comments about autobuilder results, which
the patch cannot show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thomas-roos and others added 9 commits November 30, 2026 14:52
Three more things maintainers ask for are static: a REQUIRED_, ANY_OF_
or CONFLICT_DISTRO_FEATURES that nothing enforces because the recipe
does not inherit features_check, as on gstreamer1.0-plugins-bad, a
GitHub /archive/ tarball, and a PACKAGECONFIG flag with an empty
enable or disable side, as on orc. They are oelint-adv rules now. The
last is a style note, not counted: whether the empty side is a defect
depends on upstream's build files, which the model judges. The review
rule on GitHub archives leaves the model's prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new check, such as the oelint-adv rules of bodnuti's own, reached only
series that arrived after it. Each report now records the version of
the checks it was made with, report::CHECKS, raised when a check is
added or changes; the watcher checks an open series again when its
report is older. A landed series stays as it is, and the model review
is reused by patch-id, so a check again costs no model time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Claude Code plugin's bodnuti skill runs the same image, so it gets
the oelint-adv rules of bodnuti's own with the next image; its
description now names what they check, so Claude knows those form
questions are the checks' and not its own. The review rules skill
already sends form to the bodnuti skill and shares the trimmed rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model costs about 20 minutes a patch, and some patches carry
nothing for it: a version bump that changes only SRCREV, checksums and
PV while upstream's build files stay the same, or a patch that only
drops carried patches. Such a patch now gets the checks only and a
"model review skipped" with the reason. A license checksum, a new or
refreshed carried patch, a changed upstream build file or any other
line keeps the review, as does a removed DEPENDS. The build diff now
says when upstream's build files did not change, so that is known
rather than assumed. Of 303 patches queued on the live preview, 69
qualify as far as upstream's build files allow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Backport of a commit no upstream release contains should be marked
Accepted, as a maintainer told libgpiod; nothing said so. For the
commit a Backport URL names, bodnuti now fetches the upstream history
as commits only into a cache beside the clone and adds to the upstream
commit's facts the first release tags that contain it, or that none
does and which branches do. On libjitterentropy 3.7.0's carried patch:
no release tag, only master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A carried patch marked Submitted whose pull or merge request upstream
has since merged should become a Backport of that commit; nothing
noticed. For Upstream-Status: Submitted with a GitHub pull request or
a GitLab merge request, bodnuti asks the host's API and tells the
review whether and as which commit it was merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An Upstream-Status: Submitted URL may point at any pull or merge
request, not the one that carries the patch. bodnuti now also fetches
the request's diff and compares it with the carried hunks, the same
way as a Backport with its commit: the same patch-id, or the request's
diff of the files the patch changes and the files it leaves out. The
comparison is one function for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ches

Four more review rules are static: an old license name such as GPLv2
or BSD instead of an SPDX identifier, Python 2 (inherit pythonnative,
python-native), PACKAGECONFIG defaults set with = or :append in a
recipe where a distro cannot override them, and a carried patch
applied only under an override. They are oelint-adv rules of
bodnuti's own; the conditional patch is a style note, as maintainers
accept it with a reason in the commit that oelint does not see. VAR:
remove in a recipe, also in that rule, fired on 18 of 150 merged
OE-Core recipes and was left out. The first three leave the model's
rules. report::CHECKS is 3, so open series are checked again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
outcomes.rs scored each review against what the lists later decided,
but nothing read its scores; the replays measure against the
maintainers instead. It goes, and with it the only release of the refs
that keep a patch's applied commit for the tools. The drain now
releases that ref as soon as the patch's review is stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thomas-roos and others added 7 commits November 30, 2026 16:04
Whether a backported commit is in an upstream release and whether a
submitted pull request was merged are fixed rules, but need the
network, which the check container has not. Section 12 drafts a step
on the host after the container check that adds them as ordinary
findings, and asks where it should run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whether the commit a Backport names is in an upstream release, and
whether a Submitted pull or merge request was merged, are fixed rules
that need the network. They are checks now, run on the host after the
container check, in the watcher and in bodnuti check (--offline skips
them): bodnuti.upstream.backport-unreleased and
bodnuti.upstream.submission-merged, counted like any finding. A host
the layer never fetched from is not asked. On libjitterentropy 3.7.0
the first fires: its carried patch is a Backport of a commit only on
master. report::CHECKS is 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five more review rules a fixed rule decides: a build tool in DEPENDS
that a class brings (pkgconfig, cmake-native, python3-native, target
gettext or python3-setuptools), bash in RDEPENDS:${PN}, the patch and
comment devtool upgrade leaves behind, /usr or ${D} in configure
options, and sed -i on build files. Tried on 150 merged OE-Core
recipes first: gettext-native alone (5 hits) and EXTRA_OEMAKE's ${D}
(an install path) were left out, and the sed is a style note, as
libgcc and libmd use one for values only known at build time. Four
review rules leave the model's prompt. report::CHECKS is 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Raising report::CHECKS marked every open series for a check again at
once; on the live preview that was some 270 series in one run, and the
pages were not published until all were done. Twelve a list and run
are now checked again, the rest in the runs after.

Fixes: 69ca811 ("watch: check open series again when the checks change")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first live finding listed some forty numbered branches of bluez's
GitHub mirror besides master. A commit in no release is now reported
with master or main by name and the other branches counted.

Fixes: eda4de0 ("upstream: which releases contain a backported commit")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CHECKS.md

Four more review rules a fixed rule decides: a glibc package in a
dependency without a libc override, a unit file installed by a recipe
that does not inherit systemd, a CVE_VERSION that repeats the version,
and a carried patch that says Pending while its header links a pull
request, merge request or lore post. locale-base-* was left out of the
first: merged recipes use it for ptests. The glibc review rule leaves
the model's prompt. report::CHECKS is 6.

docs/CHECKS.md lists every check bodnuti runs, with its id, what it
reports, whether it counts and the test that covers it, the facts the
model gets, when the model is skipped, and how to run the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thomas-roos and others added 12 commits November 30, 2026 17:14
Three more rules a fixed one decides, each tried on what OE-Core and
meta-oe merged in 2026 first. A recipe renamed to a version that sorts
lower, compared as dpkg does, needs a PE bump; the one merged case was
a revert, which is excepted. A From: or Signed-off-by: in a carried
patch with a placeholder identity (@example.com, OE Builder) names no
person; none was merged. INHIBIT_PACKAGE_STRIP and its kind without a
comment is a style note, as go-common.inc does without. A sign-off
taken out of a refreshed patch was tried too and left out: twelve
merged upgrades did so. An override on a variable flag was tried and
left out: IMAGE_CMD:wic[vardepsexclude] is a variable named with its
override, which no fixed rule tells apart. The version review rule
leaves the model's prompt; docs/CHECKS.md lists the new checks.
report::CHECKS is 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rules that mixed a fixed test with judgment are split: a PACKAGECONFIG
with the same option in both arms or more than six fields, a Backport
whose URL is a distribution's or that names nothing, a SRC_URI entry or
parameter given twice, and a *_native path in a target recipe's
options are oelint-adv rules of bodnuti's own now; the model's rules
keep only what needs judgment (a runtime dependency in the fourth
field, a Backport from an unmerged request). Tried on 300 merged
OE-Core recipes: FILES:${PN} = replacing bitbake.conf's default fired
on 50 and was left out, and cross and canadian recipes are no target
for the native-path rule. rules-paths.md is empty and goes. 45 review
rules remain. report::CHECKS is 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the judge set with the current bodnuti, Qwen3.8 answered clang's
check pass with nothing after a tool turn. The plain request for the
verdict was asked only when no tools were offered, so the empty
answer counted as a refutation of a true finding. An empty answer now
gets that one question, without tools, whether tools were offered or
not.

Fixes: 0dcdd52 ("verify: answer without tools after a broken tool call")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file:// entry whose file is in none of FILESPATH's directories beside
the recipe fails do_fetch. bodnuti checks the directories bitbake.conf
derives (BPN-PV, BPN, PN-PV, PN, files), with BPN without -native,
-cross and the like, and leaves recipes that set FILESEXTRAPATHS or
name a variable or wildcard alone. On 300 merged OE-Core recipes it
fired on none once BPN was derived as BitBake does. report::CHECKS is
9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
meta/lib/oe, oeqa and scripts are Python, and an undefined name there
is a fixed rule's to find, as pillow's backported tests showed in a
carried patch. ruff now runs on a layer's Python files too, with only
syntax errors, undefined names and comparisons that are always true or
false; the security rules it runs for Django applications stay off,
as OE's scripts build shell commands on purpose. report::CHECKS is 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check container mounts OE-Core and BitBake read-only, and git
cannot add a worktree there, so every meta-oe series, and every series
for a stable branch, got "BitBake values: git worktree add ... Read-
only file system" on the live preview instead of values. The OE-Core
and BitBake of the patch's branch and date are now written out with
git archive, which only reads; the patched tree, which is writable,
keeps its worktrees.

Fixes: a7c0f51 ("bitbake: OE-Core and BitBake of the branch the subject names")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three faults the live preview showed in its reports:

Fetching a git source for the check pass's upstream tools with --depth
1 into the layer clone made the clone shallow, and patchtest could then
not read the base's tree: 153 of the last 155 reports failed it.
Upstream sources are now fetched into a cache repository beside the
clone, and only their files are stored in it, as a tarball's are.

BitBake's server would not start in the check container, which has no
en_US.UTF-8 locale, so every series got "Unable to connect to bitbake
server" instead of values. The image now generates that locale.

A history too large to fetch, as gcc's, or a host that does not
answer, was a tool error on the page. These checks are best effort:
such a failure is logged and gives no finding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
locale broke are checked again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the locale in the image, BitBake's server started in the check
container and then refused to go on: base.bbclass found none of the
host tools (gcc, make, patch...) it links for a build. Parsing needs
none of them, so the helper sets HOSTTOOLS empty. Tried in the live
image with the container's own flags: the configuration now parses.
report::CHECKS is 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oelint-adv prints "OOPS - That shouldn't happen" to stdout when a rule
crashes, as its multilineindent rule does on libmoo-perl. Run with
status(), its stdout was the container's stdout, ahead of the JSON
report, so the watcher read no report and the series failed. Capture
the output and put the last line in the tool error instead.

Fixes: 271c154 ("check: report new oelint-adv findings")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Raising report::CHECKS queued every open series again, 760 patches at
about five a poll, and the queue ran oldest first: a series posted today
waited days behind them. Review the newest first, after skipping those
that waited more than three days, which costs no model time; a series'
patches stay in order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The index lists series newest first only, so finding the series with
model findings, failures or a given author meant scrolling. A short
inline script sorts by the column clicked, again for the other way;
Model review sorts by a data-sort count, a dash before none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant