Files
systemd/.github
Christian Brauner c53e3873c5 ci: give the Claude review agents semcode (#44651)
The Claude review agents navigate the systemd and kernel sources with
grep
and by reading whole files. semcode
(https://github.com/masoncl/semcode-devel)
indexes C code with tree-sitter and answers where a function is defined,
who
calls it and what a type looks like from the index, in one call, through
an
MCP server. This gives the agents semcode for the checkout and for the
kernel
tree, and makes them use it.

- A new semcode workflow builds semcode at a pinned commit of
semcode-devel
and indexes mainline once a week, both into the actions cache. A cold
build
  takes about twenty minutes and the kernel index is about a gigabyte,
neither fits into a review. systemd uses no actions cache so far, so the
  whole quota is available.
- The review job restores both, indexes the pull request (the head plus
the
range from the merge base, so lookups work before and after the change
and
per commit; about a minute on a runner) and gives every lens a systemd
and
a linux server. When there is a kernel index, the kernel is fetched at
the
  indexed commit instead of the latest mainline.
- Everything semcode runs in CI runs under bubblewrap: the indexers with
only
  the index writable, the servers read-only and without network, and no
server starts if bwrap doesn't work. semcode-mcp runs outside the Claude
  Code sandbox, so this gives it one.
- A PreToolUse hook denies recursive grep over src/ and over the kernel
tree
  and names the semcode tools instead. Single files, the rest of the
  checkout, Documentation/, the other trees and "define" lookups stay
  grep-able, since object-like macros aren't indexed.
- Each lens reports how many semcode calls succeeded and how many grep
  commands it ran, so we can see whether the agents actually use it.

Nothing changes for reviews until the semcode workflow has run on main
once
and filled the cache. Until then the review runs as before.
2026-11-05 16:27:40 +01:00
..
2026-05-19 16:36:39 +02:00
2020-02-05 21:29:34 +09:00