Repository navigation
Conversation
CI accepted malformed Changelog- lines which changelog.py ignored. Match the parser's accepted prefixes so CI and the release notes agree. Changelog-None Co-authored-by: Cursor <cursoragent@cursor.com>
A non-strict xfail also passes when the test unexpectedly succeeds. Reject added pytest.mark.xfail decorators without strict=True. Co-authored-by: Cursor <cursoragent@cursor.com>
A default label hides the compiler warning when an enum gains a value. Reject added defaults in switches whose cases are enum values. Co-authored-by: Cursor <cursoragent@cursor.com>
Add make check-commits to build each commit and run check-source, unit tests and touched integration tests. check-commits-full runs all integration tests instead. Co-authored-by: Cursor <cursoragent@cursor.com>
Add a workflow which maintainers can enable with a repository variable, a PR label or workflow_dispatch. It enables Rust only when the PR touches Rust inputs. Co-authored-by: Cursor <cursoragent@cursor.com>
Comments should describe the code a reader can see. Reject added comments which narrate the change, describe removed code, cite a ticket or review, or point to a line number. Co-authored-by: Cursor <cursoragent@cursor.com>
Limit comments inside code to 4 lines and comments at the left margin to 8. BOLT quotes and tutorial comments are exempt. Co-authored-by: Cursor <cursoragent@cursor.com>
Check each new commit for wrapped text, short paragraphs and a blank line after the subject. Reject markdown headings and references to a PR, its review or another commit by relative position. Co-authored-by: Cursor <cursoragent@cursor.com>
Reject a new non-static function when no tracked C file calls it. Calls from tests and later commits in the branch count; generated wire helpers are exempt. Co-authored-by: Cursor <cursoragent@cursor.com>
An object allocated only to be handed over with take() should have no other owner. Reject added take() calls which allocate from tmpctx or pass a non-NULL parent to tal or towire helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
Require commit subjects to use the "subsystem: intent" form from the style guide. Preserve exceptions for fixups, releases and reverts. Co-authored-by: Cursor <cursoragent@cursor.com>
The prefix allowlist rejects valid subsystems and requires constant maintenance. check-source now checks subject shape without an allowlist. Co-authored-by: Cursor <cursoragent@cursor.com>
sangbida
force-pushed
the
agent-friendly-checks
branch
from
November 19, 2026 01:25
cb240d9 to
fe1c03b
Compare
sangbida
requested review from
Andezion,
cdecker,
daywalker90,
jaonoctus and
nGoline
November 19, 2026 08:54
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
More code is being written with coding agents, and agents infer conventions
from the code already in the repository. Review feedback which exists only
in documentation or PR discussions is easy to miss and has to be enforced
repeatedly by humans.
This turns a set of recurring CLN review comments into deterministic checks.
The rules apply to all contributors, but are designed to give agents useful
feedback while they build and test their changes.
Existing code is grandfathered: source checks apply only to lines or
definitions added by the branch.
Source checks
This adds checks for:
pytest.mark.xfailwithoutstrict=True;default:added to a switch over an enum;review, or point to a line number;
take()of objects allocated fromtmpctxor another non-NULL parent.BOLT quotes, tutorial comments and generated wire helpers have the necessary
exceptions.
Commit checks
Commit messages are checked for:
subsystem: intentform;The old commitlint prefix allowlist is removed because it rejected valid CLN
subsystems and needed updating for every new plugin or directory.
Per-commit verification
make check-commitschecks every commit in a branch by running:make check-source;make check-commits-fullruns the complete integration suite on everycommit.
An opt-in GitHub workflow provides the same per-commit verification for a PR.
Maintainers can enable it with the
per-commit-checkslabel, thePER_COMMIT_CHECKSrepository variable orworkflow_dispatch. Rust isdisabled when the PR does not touch Rust inputs.
Changelog validation
The changelog CI check now accepts only entries which
changelog.pywillactually collect, preventing malformed entries from passing CI and then
disappearing from the release notes.
Changelog-None