0.0.5-alpha.5
This commit is contained in:
205
deltas/0.0.5/alpha.5.md
Normal file
205
deltas/0.0.5/alpha.5.md
Normal file
@@ -0,0 +1,205 @@
|
||||
<!-- file: deltas/0.0.5/alpha.5.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta 0.0.5-alpha.5 — audit Rust de façade/export completeness
|
||||
|
||||
## Baseline et version
|
||||
|
||||
Baseline attendue : commit opérateur complet de `0.0.5-alpha.4`, réalisé après application de `history/0.0.5/alpha.4.md` avec statut `PASS`.
|
||||
|
||||
Le hash de ce futur commit n'est pas anticipé.
|
||||
|
||||
Version avant application :
|
||||
|
||||
```text
|
||||
0.0.5-alpha.4
|
||||
```
|
||||
|
||||
Version après application :
|
||||
|
||||
```text
|
||||
0.0.5-alpha.5
|
||||
```
|
||||
|
||||
## Rôle de la tranche
|
||||
|
||||
`alpha.5` extrait un audit Rust facultatif réellement réutilisable à partir du corpus KSP/Games, mais corrige avant généralisation une limite découverte dans le script historique : Games organise ses crates sous plusieurs niveaux et n'était pas réellement couvert par le glob `crates/*/Cargo.toml`.
|
||||
|
||||
La tranche reste limitée à la façade crate-root et aux chemins same-crate canoniques. Elle ne copie pas `audit_rust_general_rules.py`, ne commence pas Tauri et ne transforme pas PGR en workspace Rust.
|
||||
|
||||
## Scope
|
||||
|
||||
REPLACE :
|
||||
|
||||
```text
|
||||
VERSION
|
||||
docs/000-README.md
|
||||
docs/plans/005-V0_0_5_RECONCILIATION_PLAN.md
|
||||
docs/rules/510-RUST_CARGO.md
|
||||
docs/skeletons/002-RUST_CARGO_WORKSPACE.md
|
||||
docs/studies/001-KSP_GAMES_RECONCILIATION.md
|
||||
docs/validation/001-VALIDATION_MATRIX.md
|
||||
```
|
||||
|
||||
ADD :
|
||||
|
||||
```text
|
||||
docs/validation/003-RUST_EXPORT_COMPLETENESS.md
|
||||
scripts/audit_rust_export_completeness.py
|
||||
tests/test_rust_export_completeness.py
|
||||
deltas/0.0.5/alpha.5.md
|
||||
```
|
||||
|
||||
DELETE : aucun.
|
||||
|
||||
Le history `alpha.4` appartient au commit baseline et n'est pas inclus dans l'archive du présent delta.
|
||||
|
||||
## Décisions matérialisées
|
||||
|
||||
### Audit monotâche
|
||||
|
||||
Le nouveau script possède exactement deux responsabilités :
|
||||
|
||||
```text
|
||||
RUST-API-201
|
||||
façade crate-root absente pour un élément public, ou crate-public clairement partagé
|
||||
|
||||
RUST-IMPORT-201
|
||||
chemin `crate::module::Item` alors qu'un réexport explicite fournit déjà `crate::Item`
|
||||
```
|
||||
|
||||
Les conventions des tests unitaires séparés du script historique ne sont pas reprises. Le contrôle d'un symbole `crate::X` inexistant n'est pas repris non plus, car le compilateur Rust possède déjà la résolution de noms.
|
||||
|
||||
### Découverte des crates
|
||||
|
||||
La découverte des `Cargo.toml` devient récursive et accepte les crates imbriquées. Les arbres générés usuels (`target`, `build`, `builds`, `dist`, `node_modules`, etc.) restent ignorés.
|
||||
|
||||
Le module fichier `foo/mod.rs` est interprété comme `foo`, et les réexports crate-root simples, groupés ou aliasés couverts par les tests sont reconnus.
|
||||
|
||||
### Adoption facultative
|
||||
|
||||
Le contrat général Rust reste un `SHOULD`. Un projet existant peut commencer avec `--report-only`, traiter les écarts ou exceptions locales, puis rendre l'audit bloquant seulement après décision explicite.
|
||||
|
||||
L'audit est documenté dans `docs/validation/003-RUST_EXPORT_COMPLETENESS.md` et référencé par le skeleton Rust/Cargo sans devenir obligatoire.
|
||||
|
||||
### Mesure de réconciliation
|
||||
|
||||
La prévalidation générateur sur les baselines autoritaires de `alpha.1` observe :
|
||||
|
||||
```text
|
||||
KSP 0.3.16 22 crate(s) 0 candidate(s)
|
||||
Games 0.3.5 23 crate(s) 2 candidate(s)
|
||||
```
|
||||
|
||||
Le résultat Games antérieur `0 candidate(s)` provenait d'une découverte de crates incomplète. Les deux candidats actuels ne sont pas traités comme des défauts historiques, car Games n'est pas encore gouverné par PGR.
|
||||
|
||||
## Validation opérateur
|
||||
|
||||
Après application du history `PASS` de `alpha.4`, commit/push de cette tranche, puis application du présent delta :
|
||||
|
||||
```bash
|
||||
test "$(cat VERSION)" = '0.0.5-alpha.5'
|
||||
test -f history/0.0.5/alpha.4.md
|
||||
test -f deltas/0.0.5/alpha.5.md
|
||||
test -f scripts/audit_rust_export_completeness.py
|
||||
test -f tests/test_rust_export_completeness.py
|
||||
test -f docs/validation/003-RUST_EXPORT_COMPLETENESS.md
|
||||
test ! -e history/0.0.5/alpha.5.md
|
||||
|
||||
grep -A2 '^## Statut$' history/0.0.5/alpha.4.md | grep -Fx 'PASS'
|
||||
grep -Fx '# version: 1' scripts/audit_rust_export_completeness.py
|
||||
grep -Fx '# version: 1' tests/test_rust_export_completeness.py
|
||||
grep -Fx '<!-- version: 1 -->' docs/validation/003-RUST_EXPORT_COMPLETENESS.md
|
||||
grep -Fx '<!-- version: 3 -->' docs/rules/510-RUST_CARGO.md
|
||||
grep -Fx '<!-- version: 2 -->' docs/skeletons/002-RUST_CARGO_WORKSPACE.md
|
||||
grep -Fx '<!-- version: 11 -->' docs/validation/001-VALIDATION_MATRIX.md
|
||||
|
||||
python3 -B -m unittest discover -s tests -p 'test_rust_export_completeness.py' -v
|
||||
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 - <<'PY'
|
||||
from pathlib import Path
|
||||
import re
|
||||
|
||||
history = Path('history/0.0.5/alpha.4.md').read_text(encoding='utf-8')
|
||||
assert re.search(r'## Statut\s+PASS\s', history)
|
||||
|
||||
script = Path('scripts/audit_rust_export_completeness.py').read_text(encoding='utf-8')
|
||||
for phrase in (
|
||||
'def crate_roots(',
|
||||
'root.rglob("Cargo.toml")',
|
||||
'RUST-API-201',
|
||||
'RUST-IMPORT-201',
|
||||
'--report-only',
|
||||
'--summary-only',
|
||||
):
|
||||
assert phrase in script, phrase
|
||||
for forbidden in ('RUST-IMPORT-202', 'RUST-IMPORT-203', 'RUST-IMPORT-204', 'RUST-IMPORT-205'):
|
||||
assert forbidden not in script, forbidden
|
||||
|
||||
validation = Path('docs/validation/003-RUST_EXPORT_COMPLETENESS.md').read_text(encoding='utf-8')
|
||||
for phrase in (
|
||||
'22` crates KSP',
|
||||
'23` crates Games',
|
||||
'0 candidate(s)',
|
||||
'2 candidate(s)',
|
||||
'ne sont pas qualifiés de défauts rétroactifs',
|
||||
):
|
||||
assert phrase in validation, phrase
|
||||
|
||||
plan = Path('docs/plans/005-V0_0_5_RECONCILIATION_PLAN.md').read_text(encoding='utf-8')
|
||||
assert 'KSP = 0 candidate(s) / 22 crates' in plan
|
||||
assert 'Games = 2 candidate(s) / 23 crates' in plan
|
||||
|
||||
print('0.0.5 alpha.5 Rust façade audit: clean (recursive crate discovery, narrow ownership, regression coverage)')
|
||||
PY
|
||||
|
||||
git diff --check
|
||||
|
||||
git add VERSION docs/000-README.md \
|
||||
docs/plans/005-V0_0_5_RECONCILIATION_PLAN.md \
|
||||
docs/rules/510-RUST_CARGO.md \
|
||||
docs/skeletons/002-RUST_CARGO_WORKSPACE.md \
|
||||
docs/studies/001-KSP_GAMES_RECONCILIATION.md \
|
||||
docs/validation/001-VALIDATION_MATRIX.md \
|
||||
docs/validation/003-RUST_EXPORT_COMPLETENESS.md \
|
||||
scripts/audit_rust_export_completeness.py \
|
||||
tests/test_rust_export_completeness.py \
|
||||
deltas/0.0.5/alpha.5.md
|
||||
|
||||
git diff --cached --check
|
||||
git status --short
|
||||
```
|
||||
|
||||
La sortie Git attendue avant ajout du history `alpha.5` est exactement :
|
||||
|
||||
```text
|
||||
M VERSION
|
||||
A deltas/0.0.5/alpha.5.md
|
||||
M docs/000-README.md
|
||||
M docs/plans/005-V0_0_5_RECONCILIATION_PLAN.md
|
||||
M docs/rules/510-RUST_CARGO.md
|
||||
M docs/skeletons/002-RUST_CARGO_WORKSPACE.md
|
||||
M docs/studies/001-KSP_GAMES_RECONCILIATION.md
|
||||
M docs/validation/001-VALIDATION_MATRIX.md
|
||||
A docs/validation/003-RUST_EXPORT_COMPLETENESS.md
|
||||
A scripts/audit_rust_export_completeness.py
|
||||
A tests/test_rust_export_completeness.py
|
||||
```
|
||||
|
||||
## Transition
|
||||
|
||||
### PASS
|
||||
|
||||
Créer/appliquer `history/0.0.5/alpha.5.md`, committer/pousser `0.0.5-alpha.5`, puis poursuivre à `0.0.5-alpha.6` pour le premier profil framework Tauri.
|
||||
|
||||
### FAIL
|
||||
|
||||
Rester dans `0.0.5-alpha.5.fix.M` si le défaut concerne l'audit, ses tests, sa documentation ou l'intégration Rust/Cargo. Ne pas absorber le profil Tauri dans un fix.
|
||||
Reference in New Issue
Block a user