From 3802476cdd6d0f44628e387dff7177e8fde975ff Mon Sep 17 00:00:00 2001 From: SinuS Von SifriduS Date: Sun, 27 Sep 2026 23:05:27 +0200 Subject: [PATCH] 0.0.1-alpha.3.fix.2 --- Cargo.lock | 6 +- Cargo.toml | 4 +- VERSION | 2 +- .../src/content_family.rs | 6 +- deltas/0.0.1/alpha.3.fix.2.md | 184 ++++++++++++++++++ docs/plans/001-V0_0_1_FOUNDATION_PLAN.md | 6 +- docs/validation/001-VALIDATION_MATRIX.md | 20 +- history/0.0.1/alpha.3.fix.2.md | 118 +++++++++++ 8 files changed, 336 insertions(+), 10 deletions(-) create mode 100644 deltas/0.0.1/alpha.3.fix.2.md create mode 100644 history/0.0.1/alpha.3.fix.2.md diff --git a/Cargo.lock b/Cargo.lock index 44941b0..5f2be49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 4 [[package]] name = "knowledge-domain-lib" -version = "0.0.1-alpha.3.fix.1" +version = "0.0.1-alpha.3.fix.2" [[package]] name = "knowledge-git-api" -version = "0.0.1-alpha.3.fix.1" +version = "0.0.1-alpha.3.fix.2" dependencies = [ "knowledge-domain-lib", ] [[package]] name = "knowledge-sync-api" -version = "0.0.1-alpha.3.fix.1" +version = "0.0.1-alpha.3.fix.2" dependencies = [ "knowledge-domain-lib", ] diff --git a/Cargo.toml b/Cargo.toml index 5c5b6b6..ceeb474 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ # file: Cargo.toml -# version: 3 +# version: 4 [workspace] resolver = "3" @@ -10,7 +10,7 @@ members = [ ] [workspace.package] -version = "0.0.1-alpha.3.fix.1" +version = "0.0.1-alpha.3.fix.2" edition = "2024" publish = false repository = "https://git.sasedev.com/Sasedev/sasedev-knowledge" diff --git a/VERSION b/VERSION index 85e44d7..3e32a6d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.1-alpha.3.fix.1 +0.0.1-alpha.3.fix.2 diff --git a/crates/knowledge-domain-lib/src/content_family.rs b/crates/knowledge-domain-lib/src/content_family.rs index 0ce531c..6f2d23f 100644 --- a/crates/knowledge-domain-lib/src/content_family.rs +++ b/crates/knowledge-domain-lib/src/content_family.rs @@ -1,13 +1,17 @@ // file: crates/knowledge-domain-lib/src/content_family.rs -// version: 1 +// version: 2 //! Content-family identities owned by the Knowledge domain. /// Semantic family of knowledge content. #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub enum ContentFamily { + /// Normative Project Governance Rules content. Pgr, + /// Practical HOWTO content derived from concrete workflows. Howto, + /// Reusable focused code or configuration snippet content. Snippet, + /// Knowledge that remains local to one project and is not promoted to a shared family. ProjectLocal, } diff --git a/deltas/0.0.1/alpha.3.fix.2.md b/deltas/0.0.1/alpha.3.fix.2.md new file mode 100644 index 0000000..fb726d7 --- /dev/null +++ b/deltas/0.0.1/alpha.3.fix.2.md @@ -0,0 +1,184 @@ + + + +# 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. diff --git a/docs/plans/001-V0_0_1_FOUNDATION_PLAN.md b/docs/plans/001-V0_0_1_FOUNDATION_PLAN.md index a03b354..5ba9c0b 100644 --- a/docs/plans/001-V0_0_1_FOUNDATION_PLAN.md +++ b/docs/plans/001-V0_0_1_FOUNDATION_PLAN.md @@ -1,5 +1,5 @@ - + # Plan 0.0.1 — fondation SaseDev Knowledge @@ -130,7 +130,9 @@ Statut opérateur initial : **FAIL**. La gate valide la structure et les audits puis échoue dans `knowledge-domain-lib` : `SourceId::new` tente de construire le tuple struct privé via le re-export crate-root depuis son sous-module. Le même défaut bloque `cargo check`, Clippy et les trois suites ciblées. -`alpha.3.fix.1` corrige ce défaut Rust, ajoute une régression directe de construction `SourceId` et précise la trajectoire Web/Maud fournie avant clôture de la tranche ; il ne démarre aucune implémentation frontend ou serveur. +`alpha.3.fix.1` corrige ce défaut Rust, ajoute une régression directe de construction `SourceId` et précise la trajectoire Web/Maud fournie avant clôture de la tranche ; il ne démarre aucune implémentation frontend ou serveur. Sa gate opérateur reste toutefois **FAIL** : `cargo check` et les tests passent, mais Clippy strict rejette les quatre variantes publiques de `ContentFamily` non documentées sous `missing_docs`. + +`alpha.3.fix.2` corrige exclusivement cette dette de documentation publique et rejoue la gate Rust complète sans modifier les contrats domaine/Git/synchronisation ni le cadrage Web/Maud. Le scope fonctionnel de `alpha.3` reste : introduire uniquement les premiers contrats/types nécessaires aux frontières `GitRepository`, source/famille de contenu et synchronisation, avec tests ciblés. Le modèle doit supporter au moins les trois sources initiales sans coder une limite à trois. diff --git a/docs/validation/001-VALIDATION_MATRIX.md b/docs/validation/001-VALIDATION_MATRIX.md index a786bcb..40dc75d 100644 --- a/docs/validation/001-VALIDATION_MATRIX.md +++ b/docs/validation/001-VALIDATION_MATRIX.md @@ -1,5 +1,5 @@ - + # Matrice de validation Knowledge @@ -196,3 +196,21 @@ Le fix doit prouver : - aucune dépendance ou crate fonctionnelle Web/Actix/PostgreSQL/Gitea ajoutée ; - trajectoire Web documentée : skeleton Web PGR obligatoire en `alpha.4`, templates statiques de référence, rendu runtime Maud, manifest Vite produit côté frontend et intégration Actix/Maud seulement en `alpha.5` ; - hygiène Git et documentation propres. + +## Gate de `0.0.1-alpha.3.fix.2` + +Le second fix doit prouver : + +- `VERSION = 0.0.1-alpha.3.fix.2` et version workspace identique ; +- history `alpha.3.fix.1` `FAIL` committé avant application du fix ; +- documentation Rust présente sur chacune des quatre variantes publiques `Pgr`, `Howto`, `Snippet` et `ProjectLocal` ; +- aucune réduction de la politique `missing_docs` et aucun `allow(missing_docs)` introduit pour contourner la gate ; +- audits Rust PGR sélectionnés propres ; +- `cargo check --workspace` sans warning `missing_docs` ; +- Clippy workspace strict `-D warnings` `PASS` ; +- les trois suites ciblées `knowledge-domain-lib`, `knowledge-git-api` et `knowledge-sync-api` `PASS` ; +- `Cargo.lock` régénéré/versionné si la version workspace le modifie ; +- aucun changement fonctionnel des contrats domaine/Git/synchronisation ; +- aucun frontend, serveur Actix, schéma PostgreSQL ou adapter de forge ajouté ; +- hygiène Git et documentation propres. + diff --git a/history/0.0.1/alpha.3.fix.2.md b/history/0.0.1/alpha.3.fix.2.md new file mode 100644 index 0000000..2a9149c --- /dev/null +++ b/history/0.0.1/alpha.3.fix.2.md @@ -0,0 +1,118 @@ + + + +# History 0.0.1-alpha.3.fix.2 — documentation publique `ContentFamily` + +## Statut + +FAIL + +La gate opérateur de `0.0.1-alpha.3.fix.2` exécutée le `2026-09-27` valide l'ensemble de la gate Rust, mais échoue sur l'hygiène Git/Markdown : `git diff --check` détecte une ligne vide supplémentaire en fin de `docs/validation/001-VALIDATION_MATRIX.md`. + +## Baseline opérateur + +`alpha.3.fix.1` `FAIL` a été historisé, committé et poussé avant application du second fix : + +```text +history/0.0.1/alpha.3.fix.1.md = FAIL +commit fd3d363 +message 0.0.1-alpha.3.fix.1 +branch master +push origin/master PASS +status clean après push +``` + +Le push observé a avancé `origin/master` de `6b6bdcf` à `fd3d363`. + +## Audit structurel + +La gate structurelle du fix passe : + +```text +Knowledge 0.0.1-alpha.3.fix.2 structural audit: clean +``` + +Les quatre variantes publiques de `ContentFamily` disposent de doc-comments et aucun `allow(missing_docs)` n'est introduit. + +## Audits Rust + +Les audits PGR sélectionnés passent : + +```text +Rust blank-line audit: clean (8 file(s)) +Rust item-spacing audit: clean (8 file(s)) +Rust module-order audit: clean (8 file(s)) +Rust trait-import-block audit: clean (8 file(s)) +Rust re-export-block audit: clean (8 file(s)) +Rust export completeness audit: 0 candidate(s) across 3 package(s) +``` + +## Cargo et Clippy + +Les commandes suivantes passent sans warning `missing_docs` : + +```text +cargo check --workspace PASS +cargo clippy --workspace --all-targets --all-features + -- -D warnings PASS +``` + +Les trois packages sont observés en version : + +```text +0.0.1-alpha.3.fix.2 +``` + +L'audit metadata est propre. + +## Tests ciblés + +Les résultats sont : + +```text +knowledge-domain-lib : 3 passed; 0 failed +knowledge-git-api : 1 passed; 0 failed +knowledge-sync-api : 1 passed; 0 failed +``` + +Le correctif documentaire n'a donc introduit aucune régression fonctionnelle observée. + +## Défaut bloquant + +`git diff --check` signale avant et après staging : + +```text +docs/validation/001-VALIDATION_MATRIX.md:216: new blank line at EOF. +``` + +La tranche ne peut donc pas être marquée `PASS`, même si toute la gate Rust est propre. + +Cette anomalie provient du delta livré et doit être corrigée par une tranche distincte afin de préserver la vérité opérateur. + +## Staging observé + +Après la gate, le staging contient : + +```text +M Cargo.lock +M Cargo.toml +M VERSION +M crates/knowledge-domain-lib/src/content_family.rs +A deltas/0.0.1/alpha.3.fix.2.md +M docs/plans/001-V0_0_1_FOUNDATION_PLAN.md +M docs/validation/001-VALIDATION_MATRIX.md +``` + +La commande `it status --short` observée dans le transcript est une faute de frappe shell sans impact ; `git status --short` a été exécuté immédiatement après et fournit le scope ci-dessus. + +## Décision + +`0.0.1-alpha.3.fix.2` est `FAIL`. + +La transition autorisée est : + +```text +0.0.1-alpha.3.fix.3 +``` + +Le troisième fix doit rester purement documentaire : supprimer la ligne vide supplémentaire en fin de matrice, préserver les corrections Rust déjà validées et rejouer la gate complète.