AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Makefile: restrict git diff check

Public commit record

What the developer wrote

Authored by Lagrang3

68/100 · Adequate
Makefile: restrict git diff check

The targets `check-doc-examples` and `check-wire-format` use a plain
`git diff --exit-code HEAD` command to check differences in the wire and
doc files. They also hit every other autogenerated files thus racing
against `$(GRPC_GEN)` targets even though the're conceptually not
related.

We restrict the scope of `check-doc-examples` to the doc directory and
`check-wire-format` to fix the conflict.

Fixes flake in CI pre-build checks:
```
git diff --exit-code HEAD
diff --git a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py
index ba3afd54f..935897050 100644
Binary files a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py and b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py differ
diff --git a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py
index ab8bd868c..34a1eeaa2 100644
--- a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py
+++ b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py
@@ -3,7 +3,7 @@
import grpc
import warnings

-from pyln.grpc import node_pb2 as node__pb2
+import node_pb2 as node__pb2

GRPC_GENERATED_VERSION = '1.75.1'
GRPC_VERSION = grpc.__version__
find contrib/pyln-grpc-proto/pyln/ -type f -name "*.py" -print0 | xargs -0 sed -i'.bak' -e 's/^import \(.*\)_pb2 as .*__pb2/from pyln.grpc import \1_pb2 as \1__pb2/g'
find contrib/pyln-grpc-proto/pyln/ -type f -name "*.py.bak" -print0 | xargs -0 rm -f
make: *** [Makefile:670: check-wire-format] Error 1
```

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This is a build-system fix for a flaky CI test. It narrows two 'git diff' checks so they only look at the specific directories they are meant to validate, instead of scanning the entire repository. There is no security issue here.

Recommended action

No security action needed. Treat as a normal CI/build reliability improvement.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.