7.7 KiB
Delta 0.1.2-alpha.2.fix.1 — récupération de contamination inter-projet
Baseline et diagnostic
Baseline Git observée et déjà publiée sur origin/master :
17b7ef23a18c913f986c7d57caf958d33479363d
Le commit précédent observé est :
6e978bfed8c1ad10d1888cd3da92aeaf70338b7e
La gate opérateur de 0.1.2-alpha.2 avait été exécutée avec succès avant cette chaîne de commits : tests Python, audits Markdown, gate Java/Gradle et contrôles de scope étaient PASS. history/0.1.2/alpha.2.md conserve donc ce résultat réel.
La publication de la tranche a ensuite été contaminée par des fichiers provenant d'un autre projet. Les preuves Git montrent notamment :
6e978bfporte les vraies modifications PGR dealpha.2, mais ajoute aussihistory/0.0.1/alpha.3.fix.1.mdet utilise un message de commit étranger ;17b7ef2ajouteCargo.toml,crates/knowledge-domain-lib/src/content_family.rsetdeltas/0.0.1/alpha.3.fix.2.md;17b7ef2remplacedocs/plans/001-V0_0_1_FOUNDATION_PLAN.mdetdocs/validation/001-VALIDATION_MATRIX.mdpar du contenu Knowledge ;git diff --check 17b7ef2^ 17b7ef2signale en plus une ligne vide finale parasite dans la matrice de validation ;- les commits étant déjà poussés, le présent fix restaure l'état PGR par un nouveau commit et ne réécrit pas l'historique distant.
Version avant correction au niveau Git publié : état contaminé après 0.1.2-alpha.2.
Version après application :
0.1.2-alpha.2.fix.1
Objet
Ramener la branche publiée à l'état PGR attendu après alpha.2, tout en préservant les vraies modifications Java/Maven/Gradle et leur history PASS.
Ce fix est exclusivement un correctif de provenance et d'hygiène Git. Il ne change aucune décision normative de alpha.2 et n'absorbe ni le REPLAN Java/Maven/Gradle préparé pour la tranche suivante ni le scope Android réservé à 0.1.3.
Scope
REPLACE :
VERSION
docs/plans/001-V0_0_1_FOUNDATION_PLAN.md
docs/validation/001-VALIDATION_MATRIX.md
ADD :
deltas/0.1.2/alpha.2.fix.1.md
manifests/0.1.2/alpha.2.fix.1.delete.txt
DELETE :
Cargo.toml
crates/knowledge-domain-lib/src/content_family.rs
deltas/0.0.1/alpha.3.fix.2.md
history/0.0.1/alpha.3.fix.1.md
Le manifest de suppression doit contenir exactement ces quatre chemins.
Les fichiers suivants de alpha.2 MUST rester inchangés par le fix :
deltas/0.1.2/alpha.2.md
docs/plans/008-V0_1_2_JAVA_GRADLE_REEVALUATION_PLAN.md
docs/rules/520-JAVA_MAVEN_GRADLE.md
history/0.1.2/alpha.2.md
docs/rules/610-ANDROID.md reste également inchangé.
Restauration autoritaire
docs/plans/001-V0_0_1_FOUNDATION_PLAN.md et docs/validation/001-VALIDATION_MATRIX.md n'étaient modifiés ni par alpha.1 ni par alpha.2. Leur contenu attendu est donc exactement celui de la stable v0.1.1.
Le fix restaure ces deux fichiers depuis cette baseline au lieu de tenter de corriger manuellement le contenu Knowledge injecté.
Application du manifest
Après extraction du delta, appliquer explicitement le manifest de suppression :
while IFS= read -r path; do
case "$path" in
''|'#'*) continue ;;
esac
rm -f -- "$path"
done < manifests/0.1.2/alpha.2.fix.1.delete.txt
Les éventuels répertoires devenus vides ne sont pas des chemins suivis par Git et n'affectent pas le contenu publié.
Validation opérateur
Le stash pgr-0.1.2-alpha.3-before-alpha.2-recovery doit rester intact pendant toute cette gate. Ne pas exécuter stash pop avant fermeture du fix.
test "$(git rev-parse HEAD)" = '17b7ef23a18c913f986c7d57caf958d33479363d'
test "$(git rev-parse origin/master)" = '17b7ef23a18c913f986c7d57caf958d33479363d'
test "$(cat VERSION)" = '0.1.2-alpha.2.fix.1'
test -f history/0.1.2/alpha.2.md
grep -A2 '^## Statut$' history/0.1.2/alpha.2.md | grep -Fx 'PASS'
test -f deltas/0.1.2/alpha.2.fix.1.md
test ! -e history/0.1.2/alpha.2.fix.1.md
test ! -e Cargo.toml
test ! -e crates/knowledge-domain-lib/src/content_family.rs
test ! -e deltas/0.0.1/alpha.3.fix.2.md
test ! -e history/0.0.1/alpha.3.fix.1.md
git diff --exit-code v0.1.1 -- \
docs/plans/001-V0_0_1_FOUNDATION_PLAN.md \
docs/validation/001-VALIDATION_MATRIX.md
grep -Fx '<!-- version: 2 -->' docs/plans/008-V0_1_2_JAVA_GRADLE_REEVALUATION_PLAN.md
grep -Fx '<!-- version: 3 -->' docs/rules/520-JAVA_MAVEN_GRADLE.md
grep -Fx '<!-- version: 2 -->' docs/rules/610-ANDROID.md
python3 -B -m unittest discover -s tests -v
python3 -B scripts/audit_markdown_headers.py \
README.md RULES.md ROADMAP.md CHANGELOG.md docs deltas history prompts
python3 -B scripts/audit_markdown_tables.py \
README.md RULES.md ROADMAP.md CHANGELOG.md docs deltas history prompts
python3 -B scripts/audit_markdown_links.py \
README.md RULES.md ROADMAP.md CHANGELOG.md docs deltas history prompts
python3 -B - <<'PYGATE'
from pathlib import Path
import re
manifest = Path('manifests/0.1.2/alpha.2.fix.1.delete.txt')
paths = [line.strip() for line in manifest.read_text(encoding='utf-8').splitlines() if line.strip() and not line.lstrip().startswith('#')]
expected = [
'Cargo.toml',
'crates/knowledge-domain-lib/src/content_family.rs',
'deltas/0.0.1/alpha.3.fix.2.md',
'history/0.0.1/alpha.3.fix.1.md',
]
assert paths == expected, (paths, expected)
for path in expected:
assert not Path(path).exists(), path
history = Path('history/0.1.2/alpha.2.md').read_text(encoding='utf-8')
assert re.search(r'## Statut\s+PASS\s', history)
alpha2 = Path('deltas/0.1.2/alpha.2.md').read_text(encoding='utf-8')
assert '# Delta 0.1.2-alpha.2 — révision ciblée Java / Gradle' in alpha2
plan = Path('docs/plans/008-V0_1_2_JAVA_GRADLE_REEVALUATION_PLAN.md').read_text(encoding='utf-8')
assert plan.startswith('<!-- file: docs/plans/008-V0_1_2_JAVA_GRADLE_REEVALUATION_PLAN.md -->\n<!-- version: 2 -->')
profile = Path('docs/rules/520-JAVA_MAVEN_GRADLE.md').read_text(encoding='utf-8')
assert profile.startswith('<!-- file: docs/rules/520-JAVA_MAVEN_GRADLE.md -->\n<!-- version: 3 -->')
android = Path('docs/rules/610-ANDROID.md').read_text(encoding='utf-8')
assert android.startswith('<!-- file: docs/rules/610-ANDROID.md -->\n<!-- version: 2 -->')
for forbidden in (
'knowledge-domain-lib',
'# Matrice de validation Knowledge',
'knowledge-pgr-server',
):
assert forbidden not in Path('docs/validation/001-VALIDATION_MATRIX.md').read_text(encoding='utf-8'), forbidden
print('0.1.2 alpha.2.fix.1 recovery audit: clean (foreign Knowledge paths removed, PGR baseline restored, alpha.2 preserved)')
PYGATE
git diff --check
git add -A
git diff --cached --check
git status --short
Le scope indexé attendu est :
D Cargo.toml
M VERSION
D crates/knowledge-domain-lib/src/content_family.rs
D deltas/0.0.1/alpha.3.fix.2.md
A deltas/0.1.2/alpha.2.fix.1.md
M docs/plans/001-V0_0_1_FOUNDATION_PLAN.md
M docs/validation/001-VALIDATION_MATRIX.md
D history/0.0.1/alpha.3.fix.1.md
A manifests/0.1.2/alpha.2.fix.1.delete.txt
L'ordre exact peut varier ; l'ensemble des chemins doit être identique.
Transition
PASS
Produire history/0.1.2/alpha.2.fix.1.md, commit/push sous l'identité 0.1.2-alpha.2.fix.1, puis abandonner le stash préparé à partir de l'ancien HEAD contaminé et réémettre la tranche alpha.3 sur la baseline corrigée.
La tranche alpha.3 devra être régénérée ; le stash actuel sert uniquement de sauvegarde de sécurité et ne doit pas devenir la source autoritaire du nouveau delta.
FAIL
Conserver les résultats réels dans history/0.1.2/alpha.2.fix.1.md et poursuivre sous alpha.2.fix.N. Ne pas restaurer alpha.3 tant que l'état PGR publié n'est pas propre.