fix: a new immutable source is an addition, not a change
pruefe_sperrliste read --name-only, so it could not tell a modified
source from a newly added one and flagged both. That made a framework
upgrade impossible by construction: an upgrade must place a new baseline
under docs/sources/upstream/, and the lock rejected exactly that.
Upstream's check_locked.py draws the same line and asserts it ('adding a
new source is not an edit'). Modification and deletion stay locked.
This commit is contained in:
@@ -119,7 +119,19 @@ def main() -> int:
|
||||
return 1
|
||||
|
||||
try:
|
||||
geaendert = [z for z in git(root, "diff", "--name-only", bereich).splitlines() if z]
|
||||
# --name-status statt --name-only: eine unveraenderliche Quelle darf
|
||||
# nicht geaendert werden, aber eine NEUE anzulegen ist keine Aenderung.
|
||||
# Ohne diese Unterscheidung ist ein Framework-Upgrade unmoeglich - es
|
||||
# legt zwingend eine neue Baseline unter docs/sources/upstream/ an.
|
||||
# Upstream check_locked.py trennt genauso ("adding a new source is not
|
||||
# an edit").
|
||||
geaendert = []
|
||||
for zeile in git(root, "diff", "--name-status", "--no-renames",
|
||||
bereich).splitlines():
|
||||
if not zeile.strip():
|
||||
continue
|
||||
teile = zeile.split("\t")
|
||||
geaendert.append((teile[0][0], teile[-1]))
|
||||
except GitFehler as fehler:
|
||||
print(f"pruefe_sperrliste: Bereich {bereich} nicht auswertbar - {fehler}")
|
||||
print("Ungeprueft ist nicht bestanden.")
|
||||
@@ -130,10 +142,12 @@ def main() -> int:
|
||||
|
||||
befunde: list[str] = []
|
||||
|
||||
for pfad in geaendert:
|
||||
# 1. Unveraenderliche Quellen
|
||||
for status, pfad in geaendert:
|
||||
# 1. Unveraenderliche Quellen - Aenderung und Loeschung, nicht Zugang
|
||||
if any(pfad.startswith(p) for p in GESPERRT_VOLL):
|
||||
befunde.append(f"{pfad}: unveraenderlich (AGENTS.md: read-only for agents)")
|
||||
if status != "A":
|
||||
befunde.append(
|
||||
f"{pfad}: unveraenderlich (AGENTS.md: read-only for agents)")
|
||||
continue
|
||||
|
||||
# 2. Angenommene ADRs
|
||||
|
||||
Reference in New Issue
Block a user