0.0.1-alpha.3.fix.1
This commit is contained in:
246
deltas/0.0.1/alpha.3.fix.1.md
Normal file
246
deltas/0.0.1/alpha.3.fix.1.md
Normal file
@@ -0,0 +1,246 @@
|
||||
<!-- file: deltas/0.0.1/alpha.3.fix.1.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta 0.0.1-alpha.3.fix.1 — correction `SourceId` et précision Web/Maud
|
||||
|
||||
## Base requise
|
||||
|
||||
État `0.0.1-alpha.3` committé et poussé après application du history :
|
||||
|
||||
```text
|
||||
history/0.0.1/alpha.3.md = FAIL
|
||||
```
|
||||
|
||||
La version devient :
|
||||
|
||||
```text
|
||||
0.0.1-alpha.3.fix.1
|
||||
```
|
||||
|
||||
## Cause du fix
|
||||
|
||||
La gate `alpha.3` échoue avec `E0423` parce que `SourceId::new` construit le tuple struct privé via son re-export crate-root :
|
||||
|
||||
```text
|
||||
crate::SourceId(value.to_owned())
|
||||
```
|
||||
|
||||
Le type est public via re-export, mais son champ privé reste possédé par le module `source`. Le fix construit donc la valeur depuis le scope de l'implémentation avec :
|
||||
|
||||
```text
|
||||
Self(value.to_owned())
|
||||
```
|
||||
|
||||
Aucune visibilité de champ n'est élargie et aucune nouvelle API publique n'est ajoutée.
|
||||
|
||||
## Régression ajoutée
|
||||
|
||||
`knowledge-domain-lib` reçoit un test direct qui prouve qu'un identifiant valide :
|
||||
|
||||
```text
|
||||
SourceId::new("pgr")
|
||||
```
|
||||
|
||||
est construit et expose ensuite `pgr` via `as_str()`.
|
||||
|
||||
Les tests précédents restent inchangés dans leur intention : rejet de l'identifiant vide et absence de limite codée à trois sources.
|
||||
|
||||
## Précision Web/Maud
|
||||
|
||||
Une précision de trajectoire fournie avant clôture de `alpha.3` est intégrée au plan vivant sans démarrer le frontend :
|
||||
|
||||
- le skeleton PGR `003-WEB_FRONTEND` est obligatoire pour `0.0.1` ;
|
||||
- Vite + TypeScript + Sass + Bootstrap servent notamment de laboratoire indépendant pour les templates statiques de référence et les assets ;
|
||||
- le markup runtime est ensuite adapté et rendu en Maud par les serveurs Actix ;
|
||||
- le build de production Vite doit produire un manifest d'entrées hashées ;
|
||||
- l'intégration Actix/Maud consommera ce mapping au lieu de coder des noms hashés ;
|
||||
- le pattern de `actix-auth-app` est étudié comme corpus, pas copié mécaniquement.
|
||||
|
||||
La séparation de scope reste :
|
||||
|
||||
```text
|
||||
alpha.4 -> frontend indépendant, templates statiques, assets, manifest Vite
|
||||
alpha.5 -> Actix Web, Maud, résolution du manifest et intégration runtime
|
||||
```
|
||||
|
||||
Aucun `package.json`, frontend, serveur Actix, loader Rust Vite ou dépendance Web n'est ajouté par le présent fix.
|
||||
|
||||
## Corpus Vite étudié
|
||||
|
||||
Le nouveau document :
|
||||
|
||||
```text
|
||||
docs/studies/002-ACTIX_MAUD_VITE_CORPUS_STUDY.md
|
||||
```
|
||||
|
||||
consigne le pattern réellement observé dans :
|
||||
|
||||
```text
|
||||
actix-auth-app-master.zip
|
||||
SHA-256 bcdf4c568c827b77c70ee476218c2b07ea0fca408ab87d2f044333309d19ab71
|
||||
```
|
||||
|
||||
Il distingue le contrat réutilisable des détails à ne pas importer tels quels, notamment : origin `localhost:5173`, préfixe `/res`, `panic!` sur manifest invalide, arborescence d'assets et dépendances TypeScript non justifiées.
|
||||
|
||||
## Fichier Rust corrigé
|
||||
|
||||
```text
|
||||
crates/knowledge-domain-lib/src/source.rs
|
||||
crates/knowledge-domain-lib/src/unit_tests.rs
|
||||
```
|
||||
|
||||
## Documentation remplacée
|
||||
|
||||
```text
|
||||
CHANGELOG.md
|
||||
Cargo.toml
|
||||
README.md
|
||||
ROADMAP.md
|
||||
RULES.md
|
||||
VERSION
|
||||
docs/000-README.md
|
||||
docs/architecture/001-PROJECT_PROFILE.md
|
||||
docs/architecture/002-KNOWLEDGE_ARCHITECTURE.md
|
||||
docs/plans/001-V0_0_1_FOUNDATION_PLAN.md
|
||||
docs/validation/001-VALIDATION_MATRIX.md
|
||||
```
|
||||
|
||||
## Documentation ajoutée
|
||||
|
||||
```text
|
||||
docs/studies/002-ACTIX_MAUD_VITE_CORPUS_STUDY.md
|
||||
deltas/0.0.1/alpha.3.fix.1.md
|
||||
```
|
||||
|
||||
Aucun fichier n'est supprimé.
|
||||
|
||||
## `Cargo.lock`
|
||||
|
||||
Le delta ne livre pas de `Cargo.lock` préfabriqué. Les trois packages héritent de la nouvelle version workspace `0.0.1-alpha.3.fix.1`; la toolchain opérateur doit donc régénérer le lockfile réel et sa modification doit être incluse au staging du fix si Cargo l'actualise.
|
||||
|
||||
## Validation attendue
|
||||
|
||||
Après application du history `alpha.3 FAIL`, commit/push de `alpha.3`, puis extraction du présent delta :
|
||||
|
||||
```bash
|
||||
test "$(cat VERSION)" = "0.0.1-alpha.3.fix.1"
|
||||
|
||||
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.1"
|
||||
assert set(root_manifest["workspace"]["members"]) == {
|
||||
"crates/knowledge-domain-lib",
|
||||
"crates/knowledge-git-api",
|
||||
"crates/knowledge-sync-api",
|
||||
}
|
||||
|
||||
source = Path("crates/knowledge-domain-lib/src/source.rs").read_text(encoding="utf-8")
|
||||
tests = Path("crates/knowledge-domain-lib/src/unit_tests.rs").read_text(encoding="utf-8")
|
||||
study = Path("docs/studies/002-ACTIX_MAUD_VITE_CORPUS_STUDY.md").read_text(encoding="utf-8")
|
||||
plan = Path("docs/plans/001-V0_0_1_FOUNDATION_PLAN.md").read_text(encoding="utf-8")
|
||||
rules = Path("RULES.md").read_text(encoding="utf-8")
|
||||
|
||||
assert "return Ok(Self(value.to_owned()));" in source
|
||||
assert "return Ok(crate::SourceId(value.to_owned()));" not in source
|
||||
assert "source_id_constructs_and_exposes_valid_values" in tests
|
||||
assert 'SourceId::new("pgr")' in tests
|
||||
|
||||
for phrase in (
|
||||
"build.manifest = true",
|
||||
"src/app/vite.rs",
|
||||
"dev -> URL d’entrée Vite directe",
|
||||
"release -> entrée stable -> manifest Vite -> URL d’asset hashé",
|
||||
"http://localhost:5173",
|
||||
):
|
||||
assert phrase in study, phrase
|
||||
|
||||
for phrase in (
|
||||
"### alpha.4 — baseline Web indépendante et templates de référence",
|
||||
"### alpha.5 — composition Actix/Maud et manifest Vite",
|
||||
):
|
||||
assert phrase in plan, phrase
|
||||
|
||||
for phrase in (
|
||||
"Le skeleton Web PGR `003-WEB_FRONTEND`",
|
||||
"Le build Vite de production MUST produire",
|
||||
"le HTML servi en production par les applications Actix est rendu avec Maud",
|
||||
):
|
||||
assert phrase in rules, phrase
|
||||
|
||||
for forbidden in (
|
||||
"package.json",
|
||||
"vite.config.ts",
|
||||
"crates/knowledge-pgr-server",
|
||||
"crates/knowledge-howtos-server",
|
||||
"crates/knowledge-snippets-server",
|
||||
"crates/knowledge-web-lib",
|
||||
"migrations",
|
||||
):
|
||||
assert not Path(forbidden).exists(), forbidden
|
||||
|
||||
print("Knowledge 0.0.1-alpha.3.fix.1 structural audit: clean")
|
||||
PY
|
||||
|
||||
cargo metadata --format-version 1 --no-deps \
|
||||
> /tmp/sasedev-knowledge-alpha3-fix1-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-fix1-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.1", (
|
||||
package["name"],
|
||||
package["version"],
|
||||
)
|
||||
|
||||
print("Knowledge 0.0.1-alpha.3.fix.1 Cargo metadata audit: clean")
|
||||
PY
|
||||
|
||||
git add -A
|
||||
git diff --cached --check
|
||||
git status --short
|
||||
```
|
||||
|
||||
Ne pas committe `alpha.3.fix.1` avant production de son history à partir des résultats opérateur.
|
||||
Reference in New Issue
Block a user