Known limitations¶
aisignoff records declarations and works out the levels of lines from git's history. Some things that model can't express, and some checks are best effort. This page says which, so that a repository knows what the levels mean and what they don't. A finding that this page already describes is a known limitation, not a bug. The design report explains why each of these is a limit rather than something to fix.
What a line's levels record¶
The levels of a line are those of the commit that last changed it on the default branch (git blame --first-parent), as its pull request declared them. They record who last changed a line and how that change was declared, not where the code came from.
- Copying and moving. Code copied or moved to another file belongs to the commit that copied it, with that commit's levels: AI-written code copied by a person's commit shows that commit's generation. Within a file, git's diff decides whether a moved block is new.
- Touching a line. Editing one character of a line makes it the editor's, with the editor's levels and no review until a review covers it again (F-).
- Removals. Deleting lines leaves no trace in the levels.
- Whitespace. With
ignore-whitespace(the default), a change that only changes whitespace keeps a line's owner, levels and reviews. Where indentation has meaning (Python, YAML, Makefiles), that keeps the levels of code whose meaning changed: setignore-whitespace = falsein[history]for such repositories. - Reformatting commits. The commits of the ignore-revs file pass the lines they changed back to the commits before them, with their levels and reviews, whatever they changed.
lintwarns about listed commits that declare levels, are merges or look like pull requests. List only commits that reformat. - Only the landing commit declares. The merge or squash commit of a pull request declares all its lines. The commits on the branch declare nothing, so a pull request declares the highest generation of anything in it. Before the merge, the check fails a branch commit that says a higher
AI-Generationthan the description. - git's line diff. Another git version can give lines next to an edit to another commit. Pin git in CI if that matters (a container image does).
Static declarations are self-declared¶
Without [history], a file's levels are whatever its annotation says: nothing compares them with the commits that wrote the file, no gate checks them, and the review folder isn't read. The report, the badges and the HTML page say self-declared. Use [history] where the levels need to hold up.
Reviews are declarations¶
aisignoff can't verify who reviewed, or how. AI-Reviewed-by and Reviewed-by are declarations.
- With a gate, models are named by its ranking. A repository with gate rules names models exactly as the ranking does, with version and effort, and the check before the merge compares them by the ranking, not by their words. The effort is declared, not measured.
- The word checks are best effort, and only at the gate. "A self-check is A0" and "A2 and A3 need a different model" judge words: model names compared without vendors, providers, tools and version numbers, and words that name a self-check. They recognise common ways of writing these, not all of them: a model behind a tool that isn't known, another language, or a name without its comma may pass. They are checked before the merge (the pull request's description, and the lines of a change that hasn't landed), never again in history:
lintof landed commits checks the hard rules only. - Bots. A pull request opened by an account whose login ends in
[bot]names its responsible human on aResponsible personline, which the check before the merge requires. Bot accounts without that suffix aren't recognised, and in history the author is taken as written. - A landed record without findings. The check before the merge requires the findings (and for A2 and A3 the report) of every record entry a change adds. A record that landed without them, past the check, counts with its level, and leaves the findings of its lines as they were, as an older commit's review without findings does.
- The same content, the same review. A review of a whole file (an attestation of its content) covers the file whenever it has exactly that content again: a line that was replaced and later restored byte for byte gets the review back, also when the commit that restored it declares none. The review was of that content.
aisignoff gcdeletes a review of content that is gone; a later review replaces it. - Which review counts. For the findings, the one recorded last among the deepest, and any recorded after it can add to them: record files of the review folder by the commit that added them. AI reviews go only into record files, and the review a line's owner declares counts as recorded by the owner. A deep review of a few lines anchors only those: a shallower review of the whole file clears the others.
- A late review of older content counts as late. Reviews are ordered by when they were recorded, not by which content they saw. A review of an older version (
attest --at), recorded after a review of the current file at the same depth, gives its findings to the lines that older content had, although the other review saw them later. Lines changed since keep the other review. Record the review of older content first, or review the current file again.
The check before the merge is a preview¶
The result after the merge counts. The check before the merge works out the same lines from a diff against the default branch, and these cases can differ from the result after the merge:
- binary, empty and symlinked files, and files that git converts (
working-tree-encoding, Git LFS); - renames with heavy edits, which git's diff and
git blamemay pair differently; - content that isn't committed yet under a clean filter that is defined on one machine only.
Supported environment¶
- Linux, git 2.34 or later, and the whole history of the default branch (
fetch-depth: 0). In a shallow clone, the commands that work out lines stop with exit code2. - UTF-8 file names and commit messages. Other bytes are shown as escapes, and some commands refuse them.
- Uncommitted changes are read as git sees them: a file marked
assume-unchangedorskip-worktreein the index counts as unchanged, so its edits don't show as a pending change. - Regular files and symbolic links. The review folder and its record files must not be symbolic links.
- git runs without the user's and the system's configuration. Only the repository's own configuration counts, and aisignoff overrides the settings that would change the levels.
Other input is refused where aisignoff can detect it, and best effort otherwise.
Commits with an old template¶
A commit that landed with the pull request template of an earlier SIGNOFF.toml format is read with today's boxes, by their labels: its A1 box ("its own work") reads as today's A1, by the models that wrote the change as a new session, and its A2 box ("new session") ticked without a model as an A2 that names no reviewer, which lint fails. With [history], SIGNOFF.toml can't correct an AI review: record a new AI review of those lines in the review folder (aisignoff attest PATHS -a …, or --commit REV), which replaces an AI review that breaks a rule on the lines it covers, and counts after the old one.