0.0.2-alpha.5

This commit is contained in:
2026-09-29 05:59:03 +02:00
parent 1fe39dfdeb
commit da5445354e
15 changed files with 613 additions and 26 deletions

138
deltas/0.0.2/alpha.5.md Normal file
View File

@@ -0,0 +1,138 @@
<!-- file: deltas/0.0.2/alpha.5.md -->
<!-- version: 1 -->
# Delta 0.0.2-alpha.5 — cas d'usage partagé de synchronisation
## Statut
À appliquer après commit/push du history `0.0.2-alpha.4.fix.1` `PASS`.
## Scope
Cette tranche matérialise `knowledge-app-lib` comme owner de l'orchestration partagée de synchronisation de lecture. Elle compose les contrats Git et sync déjà prouvés sans introduire de stockage, scheduler, forge ou runtime réseau.
Le cas d'usage :
```text
RepositorySyncSignal
-> GitRepository::refresh
-> GitRepository::resolve_revision
-> comparaison previous_revision
-> Unchanged si identique
-> GitRepository::prepare_snapshot si changement
-> Changed { revision, snapshot }
```
La cause du signal n'altère pas le chemin de vérité Git. `Periodic` est prouvée comme une autre origine du même appel, sans scheduler concret.
## Règle de formatage
La gate applique le formatter avant les audits Rust :
```bash
cargo fmt --all
cargo fmt --all -- --check
```
Les audits du code Rust viennent seulement ensuite. Cette règle est maintenant possédée localement par `docs/rules/400-VALIDATION.md` et `docs/rules/510-RUST_CARGO.md`.
## Gate opérateur
```bash
test "$(cat VERSION)" = '0.0.2-alpha.5'
grep -F 'version = "0.0.2-alpha.5"' Cargo.toml
grep -A2 '^## Statut$' history/0.0.2/alpha.4.fix.1.md | grep -Fx 'PASS'
git diff --check
python3 -B scripts/audit_markdown_headers.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts deltas history
python3 -B scripts/audit_markdown_links.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts deltas history
python3 -B scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts deltas history
cargo fmt --all
cargo fmt --all -- --check
python3 -B scripts/audit_rust_test_layout.py crates
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_crate_root_facades.py crates
python3 -B scripts/audit_rust_export_completeness.py --root . --summary-only
cargo metadata --format-version 1 --no-deps > /tmp/sasedev-knowledge-0.0.2-alpha.5-metadata.json
cargo check --workspace
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test -p knowledge-app-lib --all-targets --all-features
cargo test -p knowledge-git-api --all-targets --all-features
cargo test -p knowledge-git-lib --all-targets --all-features
cargo test -p knowledge-sync-api --all-targets --all-features
cargo test --workspace --all-targets --all-features
python3 - <<'PYGATE'
import json
from pathlib import Path
metadata = json.loads(Path('/tmp/sasedev-knowledge-0.0.2-alpha.5-metadata.json').read_text(encoding='utf-8'))
expected = {
'knowledge-app-lib',
'knowledge-domain-lib',
'knowledge-git-api',
'knowledge-git-lib',
'knowledge-sync-api',
'knowledge-web-lib',
'knowledge-pgr-server',
'knowledge-howtos-server',
'knowledge-snippets-server',
}
assert {package['name'] for package in metadata['packages']} == expected
assert len(metadata['workspace_members']) == 9
manifest = Path('crates/knowledge-app-lib/Cargo.toml').read_text(encoding='utf-8')
assert 'knowledge-git-api.workspace = true' in manifest
assert 'knowledge-sync-api.workspace = true' in manifest
assert '[dev-dependencies]' in manifest
assert 'knowledge-domain-lib.workspace = true' in manifest
source = Path('crates/knowledge-app-lib/src/repository_sync.rs').read_text(encoding='utf-8')
for phrase in (
'RepositorySyncOutcome',
'Unchanged',
'Changed',
'GitRepository::refresh',
'GitRepository::resolve_revision',
'GitRepository::prepare_snapshot',
'previous_revision',
):
assert phrase in source, phrase
for forbidden in ('postgres', 'gitea', 'github', 'gitlab', 'actix', 'tokio', 'scheduler'):
assert forbidden not in source.lower(), forbidden
rule400 = Path('docs/rules/400-VALIDATION.md').read_text(encoding='utf-8')
rule510 = Path('docs/rules/510-RUST_CARGO.md').read_text(encoding='utf-8')
assert rule400.index('cargo fmt --all') < rule400.index('audits Rust structurels applicables')
assert rule510.index('cargo fmt --all') < rule510.index('audit_rust_test_layout.py')
print('Knowledge 0.0.2-alpha.5 sync/format-order audit: clean')
PYGATE
test -f Cargo.lock
git check-ignore -q Cargo.lock
if git ls-files --error-unmatch Cargo.lock >/dev/null 2>&1; then
echo 'Cargo.lock must remain untracked for Knowledge' >&2
exit 1
fi
test -z "$(git diff --name-only -- Web)"
test ! -e crates/knowledge-forge-gitea-lib
test ! -e crates/knowledge-store-postgres-lib
git add -A
git diff --cached --check
git status --short
```
## Transition
Un `PASS` autorise uniquement `0.0.2-beta.1`. Un échec requis produit un history factuel et un `alpha.5.fix.N` ou un REPLAN selon la nature du défaut.