0.0.1-alpha.3.fix.2
This commit is contained in:
184
deltas/0.0.1/alpha.3.fix.2.md
Normal file
184
deltas/0.0.1/alpha.3.fix.2.md
Normal file
@@ -0,0 +1,184 @@
|
||||
<!-- file: deltas/0.0.1/alpha.3.fix.2.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta 0.0.1-alpha.3.fix.2 — documentation publique `ContentFamily`
|
||||
|
||||
## Base requise
|
||||
|
||||
État `0.0.1-alpha.3.fix.1` committé et poussé après application du history :
|
||||
|
||||
```text
|
||||
history/0.0.1/alpha.3.fix.1.md = FAIL
|
||||
```
|
||||
|
||||
La version devient :
|
||||
|
||||
```text
|
||||
0.0.1-alpha.3.fix.2
|
||||
```
|
||||
|
||||
## Cause du second fix
|
||||
|
||||
Le premier fix a corrigé l'erreur `E0423` :
|
||||
|
||||
- `cargo check --workspace` termine ;
|
||||
- les trois suites ciblées passent ;
|
||||
- `SourceId::new("pgr")` est couvert par régression.
|
||||
|
||||
La gate reste néanmoins `FAIL` parce que Clippy est exécuté avec :
|
||||
|
||||
```text
|
||||
-D warnings
|
||||
```
|
||||
|
||||
et transforme en erreurs quatre warnings `missing_docs` sur les variantes publiques :
|
||||
|
||||
```text
|
||||
ContentFamily::Pgr
|
||||
ContentFamily::Howto
|
||||
ContentFamily::Snippet
|
||||
ContentFamily::ProjectLocal
|
||||
```
|
||||
|
||||
La politique `missing_docs` est intentionnelle. Le correctif ne doit donc ni la réduire ni introduire `#[allow(missing_docs)]`.
|
||||
|
||||
## Correctif
|
||||
|
||||
Le fichier :
|
||||
|
||||
```text
|
||||
crates/knowledge-domain-lib/src/content_family.rs
|
||||
```
|
||||
|
||||
documente explicitement chacune des quatre variantes publiques.
|
||||
|
||||
Aucun variant, contrat, type, trait, dépendance ou comportement n'est modifié.
|
||||
|
||||
## Scope
|
||||
|
||||
Le fix reste strictement correctif.
|
||||
|
||||
Il ne modifie pas :
|
||||
|
||||
- `GitRepository` ;
|
||||
- `RepositoryEventSource` ;
|
||||
- `RepositorySyncSignal` ;
|
||||
- le modèle de sources ;
|
||||
- la trajectoire Web/Maud/Vite ;
|
||||
- les décisions PostgreSQL/forge ;
|
||||
- les frontières des trois applications Web.
|
||||
|
||||
Aucun frontend, serveur Actix, adapter Gitea, schéma PostgreSQL ou nouvelle crate n'est ajouté.
|
||||
|
||||
## Fichiers remplacés
|
||||
|
||||
```text
|
||||
VERSION
|
||||
Cargo.toml
|
||||
crates/knowledge-domain-lib/src/content_family.rs
|
||||
docs/plans/001-V0_0_1_FOUNDATION_PLAN.md
|
||||
docs/validation/001-VALIDATION_MATRIX.md
|
||||
```
|
||||
|
||||
## Fichier ajouté
|
||||
|
||||
```text
|
||||
deltas/0.0.1/alpha.3.fix.2.md
|
||||
```
|
||||
|
||||
Aucun fichier n'est supprimé.
|
||||
|
||||
## `Cargo.lock`
|
||||
|
||||
Le delta ne livre pas de lockfile préfabriqué. Les packages héritent de la version workspace `0.0.1-alpha.3.fix.2`; Cargo peut donc mettre à jour `Cargo.lock` dans l'environnement opérateur. Toute modification réelle du lockfile reste versionnée.
|
||||
|
||||
## Validation attendue
|
||||
|
||||
Après application du history `alpha.3.fix.1 FAIL`, commit/push de `alpha.3.fix.1`, puis extraction du présent delta :
|
||||
|
||||
```bash
|
||||
test "$(cat VERSION)" = "0.0.1-alpha.3.fix.2"
|
||||
|
||||
git diff --check
|
||||
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
import tomllib
|
||||
|
||||
with Path("Cargo.toml").open("rb") as handle:
|
||||
root_manifest = tomllib.load(handle)
|
||||
|
||||
assert root_manifest["workspace"]["package"]["version"] == "0.0.1-alpha.3.fix.2"
|
||||
|
||||
content = Path(
|
||||
"crates/knowledge-domain-lib/src/content_family.rs"
|
||||
).read_text(encoding="utf-8")
|
||||
|
||||
for variant in ("Pgr", "Howto", "Snippet", "ProjectLocal"):
|
||||
marker = f" {variant},"
|
||||
index = content.index(marker)
|
||||
prefix = content[:index].rstrip().splitlines()
|
||||
assert prefix[-1].lstrip().startswith("///"), variant
|
||||
|
||||
assert "allow(missing_docs)" not in content
|
||||
assert "missing_docs = \"warn\"" in Path("Cargo.toml").read_text(encoding="utf-8")
|
||||
|
||||
print("Knowledge 0.0.1-alpha.3.fix.2 structural audit: clean")
|
||||
PY
|
||||
|
||||
cargo metadata --format-version 1 --no-deps > /tmp/sasedev-knowledge-alpha3-fix2-metadata.json
|
||||
|
||||
cargo fmt --all
|
||||
cargo fmt --all -- --check
|
||||
|
||||
python3 -B scripts/audit_rust_blank_lines.py crates
|
||||
python3 -B scripts/audit_rust_item_spacing.py crates
|
||||
python3 -B scripts/audit_rust_module_order.py crates
|
||||
python3 -B scripts/audit_rust_trait_import_blocks.py crates
|
||||
python3 -B scripts/audit_rust_reexport_blocks.py crates
|
||||
python3 -B scripts/audit_rust_export_completeness.py --root .
|
||||
|
||||
cargo check --workspace
|
||||
|
||||
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||
|
||||
cargo test -p knowledge-domain-lib --all-targets --all-features
|
||||
cargo test -p knowledge-git-api --all-targets --all-features
|
||||
cargo test -p knowledge-sync-api --all-targets --all-features
|
||||
|
||||
test -f Cargo.lock
|
||||
if git check-ignore -q Cargo.lock; then
|
||||
echo 'Cargo.lock must remain versioned' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 - <<'PY'
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
metadata = json.loads(
|
||||
Path("/tmp/sasedev-knowledge-alpha3-fix2-metadata.json").read_text(encoding="utf-8")
|
||||
)
|
||||
|
||||
packages = {package["name"] for package in metadata["packages"]}
|
||||
assert packages == {
|
||||
"knowledge-domain-lib",
|
||||
"knowledge-git-api",
|
||||
"knowledge-sync-api",
|
||||
}, packages
|
||||
|
||||
for package in metadata["packages"]:
|
||||
assert package["version"] == "0.0.1-alpha.3.fix.2", (
|
||||
package["name"],
|
||||
package["version"],
|
||||
)
|
||||
|
||||
print("Knowledge 0.0.1-alpha.3.fix.2 Cargo metadata audit: clean")
|
||||
PY
|
||||
|
||||
git add -A
|
||||
git diff --cached --check
|
||||
git status --short
|
||||
```
|
||||
|
||||
Ne pas committe `alpha.3.fix.2` avant production de son history à partir des résultats opérateur.
|
||||
Reference in New Issue
Block a user