Skip to content

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

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

thomas-roos wants to merge 236 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-differs note: changed lines a Backport's upstream commit lacks info
bodnuti.upstream.srcrev-tag note: an upgrade's SRCREV is not the commit of the version's tag info
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 (a maintainer raised it; the v2 changes target only), igt-gpu-tools testing defined(x86_64), python3-pillow backport tests missing imports.
  • Live preview, 1 December, found by the local model with every check silent on the defect: pseudo 1.99.2 keeps carrying a patch upstream already has (do_patch fails; the AutoBuilder hit it a day later), qemu adds a PACKAGECONFIG[pipewire] qemu.inc has had since 2023.
  • Claude + the plugin's rules on the same 8 patches the live model flagged: 2 real, 0 false; it missed pseudo and qemu, which need facts beyond the diff, so bodnuti check --facts now prints them for Claude. It refuted the local model's python3 finding (print() with sys.stdout = None is silent; now in facts.md).
  • Fixed 2 December: BitBake parse findings for deleted recipes, missing layers and bare BBHandledException were all false (14 on the live preview) and misled the model; they are no longer findings or facts.
  • New notes, shown open and not counted: bodnuti.upstream.backport-differs (a Backport with lines its upstream commit lacks; 17 of 120 merged backports differ, mostly resolved conflicts) and bodnuti.upstream.srcrev-tag (an upgrade's SRCREV is not the version's tag), for code riding under an upstream claim. Proposed next: carried patches that no longer apply after an upgrade (PHASE4 §12.2).
  • Dropped: bodnuti.upstream.backport-unreleased. OE-Core has no Accepted status and counts an unreleased upstream commit as a Backport, so its advice was wrong.
  • 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 28 commits December 1, 2026 09:48
oelint-adv's multilineindent rule raises ValueError on an escaped quote
in a continued value, as in libmoo-perl's DESCRIPTION, and the crash
ends the run: no series touching such a file gets any oelint finding.
--suppress and a rulefile only filter the output, the rule still runs.
bodnuti's custom rules are loaded into oelint-adv anyway, so they wrap
the rule's check to return no finding on that error; the import is
guarded in case another oelint-adv version names it otherwise.

Closes: #4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The finder retried without reasoning only when the answer was cut at
max_tokens. An answer that ended after its reasoning with no content
("no message in the answer", once on the live preview) failed the patch,
which was then sent again on the next poll with the same seed. Such an
answer now gets the same single retry without reasoning, as the check
pass already does.

Closes: #2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The series item has no path, so the line read "left out series  (341 B)"
with a gap. The kind and path are now joined and trimmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oelint-adv no longer crashes on libmoo-perl-like values, gcc backports
get the release check and mirror-fetched recipes their upstream source,
so reports made before change: check every series again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A request too large for context_tokens lost the recipe's classes first:
on the live preview 15 of 182 requests left something out, mostly
classes, which say what the patch's code does, while grep hits and
documentation entries, needed least, stayed. These now go first.

Closes: #1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bodnuti.upstream.backport-unreleased told a carried patch whose upstream
commit is in no release tag to say Accepted, not Backport. OE-Core has
no Accepted status: insane.bbclass and patchtest refuse it, and the
style guide defines Backport as accepted upstream and included in the
next release. The advice was wrong, as on webkitgtk's fix from the 2.42
branch after 2.42.5. The check goes; which releases contain a backported
commit stays a fact for the model. CHECKS goes to 15, so reports drop
the finding.

Fixes: 8acc7d6 ("check: Backports not yet released and merged submissions")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A landed series checked again against the tree before its landing was
then matched for landed patches from that older base, found none, and
became an open checked series: on the live preview about 20 merged
series showed as still under review. It now keeps the landed patches
found before the check and stays applied. CHECKS goes to 16 so those
series are checked, and put right, again.

Fixes: 962c689 ("watch: check landed series again when the checks change")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bodnuti.bitbake.parse reported every recipe that parsed before the patch
and not after. On the live preview all 14 were false: recipes the patch
deletes or moves (pulseaudio, python3-babel, FileNotFoundError), meta-ti
recipes including a file from a layer the minimal set leaves out, and a
bare BBHandledException. The model took them as fact and called two
valid :append lines in elfutils a parse error. Such errors are now
neither a finding nor told to the model; a real parse error, such as an
expansion error, still is. CHECKS goes to 17 to take them off the pages.

Fixes: 77e4047 ("review: final values from BitBake in layer 2")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A model review was folded on the series page even when it found
something, and the index showed "1 finding" in the same grey as "no
findings", so findings were easy to miss. A review with findings now
opens by default, and the index cell is bold amber for findings and
muted for none or a dash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On eight patches the local model flagged, Claude with the plugin's rules
missed the two strongest defects (pseudo keeps a patch upstream already
has, qemu defines a PACKAGECONFIG twice): it saw only the diff, while
bodnuti's model gets facts gathered without a model. bodnuti check
--facts now prints those facts per patch on stderr, the plugin's script
passes --facts through, and both skills tell Claude to read them before
reporting. facts.md also says that print() is silent when sys.stdout is
None: the local model reported that as a crash on python3's
get_module_deps3.py, which Claude refuted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A carried patch can name a real upstream commit and carry one more
hunk, and an upgrade can set SRCREV to any commit while its file name
claims a release; a reviewer who follows the link sees nothing wrong,
and BitBake checks neither (a tarball's sha256 is set by the same
patch, a SRCREV is checked only against tag=). Two network checks now
show them: bodnuti.upstream.backport-differs lists the changed lines
the named commit does not change, and bodnuti.upstream.srcrev-tag a
SRCREV that is not the commit of upstream's tag for the version. On
120 merged OE-Core backports 17 differ, mostly resolved conflicts, so
both are notes, shown and not counted (designs/PHASE4.md section 12.1).
The network checks now include renamed files, as an upgrade renames its
recipe. CHECKS goes to 18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new upstream notes (a Backport with lines its upstream commit lacks,
a SRCREV that is not the version's tag) landed in the folded style
notes, where a reviewer looking for code that rides under an upstream
claim would not see them. They now get their own section, open, with an
amber heading, and stay uncounted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PHASE4 section 12.2 proposes a check for what pseudo 1.99.2 showed: a
carried patch that the new upstream version already holds, or that no
longer applies, found with git apply against the stored upstream tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the live preview Qwen3.8 reported a pgbouncer recipe because
bb.utils.filter would remove the distro features (it returns the ones
present), and because install -g pgbouncer would fail in do_install
(useradd.bbclass creates the group in the recipe's sysroot first); the
check pass confirmed both. An elfutils finding claimed a second :append
of the same override overwrites the first. One line each in facts.md,
read by the local model and by Claude.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A series checked again reused its patch's earlier review whenever the
same model had made it. So pgbouncer and elfutils kept findings that a
recipe does not parse, made from a parse error checked before
5cd6282 stopped reporting errors of unknown cause, and reviews whose
false findings new facts address stayed as they were.

A review with findings is now redone when the prompt version changed
or the new request no longer holds a finding's evidence. A clean
review is kept, as redoing all of them would cost a model review
each. PROMPT is v6 for the facts of 50058c2, and CHECKS 19 checks the
open series again, so their reviews are reconsidered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A check's finding showed its code; a model's only prose, though each
carries the lines it quotes as evidence, already checked against the
request. The page now shows those lines under the message, in the same
code block a check's excerpt uses, so a reader can see what the model
points at.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live review reported a NameError for oe in an expression passed to
bb.utils.better_eval, but BitBake evaluates it in its own context, which
already holds oe and its BBIMPORTS modules. It also asked for a PV bump
after a SRCREV bump in recipes whose PV ends in +git, where the package
version gets the revision added automatically.

Add both as short rules, and raise the prompt to v7 so the reviews with
findings are redone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A patch queued for review longer than three days was skipped, a fixed
limit. With a backlog, such as a long series re-queued after a rule
change, patches dropped out before the workstation reached them.

Add max_age_days to [review], default 3, so an operator can keep a
backlog until it is reviewed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live review reported an RST title underline as too short in a
yocto-docs release note, but title and underline were the same length:
the model miscounted. Sphinx reports a short underline when the docs are
built, so a review need not count characters.

Add that as a fact, and raise the prompt to v8 so reviews with findings
are redone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On master, the BitBake values for model review parsed an OE-Core from
the patch's date or base with BitBake's current master. BitBake changed
how it reads layer.conf on 2026-11-30, so since then every older core
failed with "TypeError: 'NoneType' object is not iterable", and 186
series showed "not checked" although their checks had run.

Take BitBake as it was when that OE-Core was committed, on master as on
a stable branch, and raise the checks version so open series are checked
again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the BitBake values for model review could not be gathered, the
error counted as a tool error, and the series showed "not checked"
although every check had run. The values are context for the model
only.

Keep the error as a note on the patch's context, carry it into the
review, and show it in the model review's summary line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a change of the checks, twelve series a list were checked again
each run, oldest first. With 186 series showing "not checked" after a
BitBake failure, the newest waited days for their result.

Check again in one run every series whose report holds tool errors, as
its page shows no result, then the others newest first, twelve a run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shellcheck could not parse the shell bodnuti took from two kinds of
metadata, and the series showed its shell as not checked. A comment
that shows a function (rm_work.bbclass: "# do_install:append () {")
was taken as one. A prepend to a Python task whose lines set
os.environ or call d.expand() mid-line (hyperfine's
do_compile_ptest_cargo:prepend) was taken as shell.

Skip headers in comments, and read a body as Python when a line starts
with os. or calls the datastore anywhere outside inline Python. Of
OE-Core's recipes and classes, three did not parse before and none do
now. Raise the checks version so the affected series are checked
again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A model finding read "confirmed by the check pass", which looked like
the static checks had confirmed it. And the evidence showed the model's
quote as given: a line it cut short, such as 19 of a title underline's
27 tildes, appeared as the patch's own line and made a false finding
look right.

Say "a second model pass" on the pages, and store each quoted line as
the whole line of the request it is part of.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ruff reported "Undefined name bb" in OE's Python (spdx30_tasks.py), but
BitBake puts bb among Python's builtins, so the code runs without an
import. And the files a patch adds, deletes and renames were read from
the raw mail: quoted-printable wraps a long diff --git line, so a
deleted recipe (zip_3.0.bb) went unseen, and its removed
LIC_FILES_CHKSUM was reported as changed without a License-Update.

Tell ruff that bb is a builtin when checking a layer, and read the paths
from the decoded mail. Raise the checks version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a fix to a check, an operator may want a few series checked again
now, not when the checks version brings them up, twelve a run.

Add --recheck to poll: the series with those root Message-IDs are
checked again in this run, whatever checks they were made with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit passed ruff --config "lint.builtins = ['bb']", which
ruff 0.17 refuses, so ruff failed on every layer with Python. The
setting is top-level: builtins = ['bb'].

The duplicate SRC_URI rule compared URLs without their parameters, but
gomod:// names the module's version in one: a go-mods.inc that fetches
two versions of a module got a warning for each, 131 in influxdb's.
Count the version parameter in. Raise the checks version.

Fixes: 27da5d6 ("check: two false errors, from ruff and from quoted-printable mail")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Confirmed by a second model pass" read as if someone, or another
model, had confirmed the finding; it is the same model asked once more
with the rules and tools, and it passed false findings too.

Say "checked twice by the same model", and in the summary line, how
many findings were refuted when the model checked again.

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