128 lines
4.5 KiB
Markdown
128 lines
4.5 KiB
Markdown
<!-- file: deltas/0.3.6/pre.003-fix.001.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# Delta `0.3.6-pre.003-fix.001` — visibilité du constructeur privé de séquence
|
|
|
|
## Base requise
|
|
|
|
```text
|
|
0.3.6-pre.003 appliquée
|
|
workspace.package.version = 0.3.6-pre.3
|
|
```
|
|
|
|
Le gate opérateur fourni pour `pre.003` confirme :
|
|
|
|
```text
|
|
cargo fmt --all PASS
|
|
python3 scripts/audit_rust_workspace_rules.py PASS / clean
|
|
python3 scripts/audit_markdown_tables.py ... PASS / clean (264 tables / 144 fichiers)
|
|
cargo check --workspace PASS
|
|
cargo clippy --workspace --all-targets FAIL / E0423
|
|
cargo test -p ksp-job-api FAIL / E0423
|
|
cargo tree -p ksp-job-api --edges normal Core-only confirmé
|
|
cargo tree -p ksp-job-api -e features aucune feature Job API
|
|
```
|
|
|
|
## Objectif
|
|
|
|
Corriger exclusivement la compilation du helper de test qui construit la position terminale artificielle nécessaire à la canarie d'overflow de `JobNotificationSequence`, sans modifier le contrat public latest-value de `pre.003`.
|
|
|
|
## Cause exacte
|
|
|
|
Le helper privé est défini dans `crates/ksp-job-api/src/notification.rs`, le module propriétaire du tuple struct :
|
|
|
|
```rust
|
|
#[cfg(test)]
|
|
fn exhausted_notification_sequence() -> crate::JobNotificationSequence {
|
|
return crate::JobNotificationSequence(u64::MAX);
|
|
}
|
|
```
|
|
|
|
Le champ de `JobNotificationSequence` est volontairement privé afin d'empêcher la construction publique depuis un entier arbitraire. Le type est réexporté à la racine de crate, mais ce re-export ne rend pas son constructeur tuple visible. Le chemin `crate::JobNotificationSequence(u64::MAX)` déclenche donc `E0423` sous les targets de test.
|
|
|
|
Le module `notification` possède déjà l'accès légitime au champ privé. Le correctif utilise directement le type local :
|
|
|
|
```rust
|
|
return JobNotificationSequence(u64::MAX);
|
|
```
|
|
|
|
Cette construction reste confinée au helper `#[cfg(test)]`; aucun constructeur arbitraire n'est ajouté à l'API publique.
|
|
|
|
## Version
|
|
|
|
Le fix modifie un fichier Rust. Conformément à `VER-ID-003`, `VER-ID-007` et `VER-ID-010` :
|
|
|
|
```text
|
|
workspace.package.version = 0.3.6-pre.3.fix.1
|
|
delivery = 0.3.6-pre.003-fix.001
|
|
commit = v0.3.6-pre.003-fix.001
|
|
```
|
|
|
|
Aucun tag prerelease.
|
|
|
|
## Fichiers ajoutés
|
|
|
|
```text
|
|
deltas/0.3.6/pre.003-fix.001.md
|
|
```
|
|
|
|
## Fichiers modifiés
|
|
|
|
```text
|
|
Cargo.toml
|
|
crates/ksp-job-api/src/notification.rs
|
|
docs/plans/027-V0_3_6_JOB_API_BACKFILL_PLAN.md
|
|
docs/validation/023-V0_3_6_JOB_API_BACKFILL.md
|
|
```
|
|
|
|
## Fichiers supprimés
|
|
|
|
Aucun.
|
|
|
|
## Décisions prises
|
|
|
|
- conserver le champ tuple de `JobNotificationSequence` privé ;
|
|
- ne pas ajouter de `from_u64`, constructeur caché public, feature de test ou autre contournement de l'invariant ;
|
|
- limiter la construction de `u64::MAX` au helper interne `#[cfg(test)]` déjà prévu par `pre.003` ;
|
|
- ne modifier ni les treize tests unitaires attendus, ni les quatorze canaries d'intégration, ni leurs assertions ;
|
|
- ne rouvrir aucune dépendance, feature, surface Backfill/Worker/Transport/Store/Logging, README, USAGE, CHANGELOG, ROADMAP ou prompt.
|
|
|
|
## Validations exécutées pour l'assemblage du fix
|
|
|
|
```text
|
|
python3 scripts/audit_rust_workspace_rules.py
|
|
-> General Rust rule audit: clean
|
|
-> Rust export completeness audit: 0 candidate(s)
|
|
-> KSP workspace Rust rule audit: clean
|
|
|
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas/0.3.6
|
|
-> Markdown table audit: clean (264 tables / 145 fichiers)
|
|
```
|
|
|
|
Le diff par rapport à `pre.003` est limité aux quatre fichiers modifiés ci-dessus et au présent delta.
|
|
|
|
## Validations non exécutées
|
|
|
|
L'environnement d'assemblage ne fournit ni `cargo` ni `rustfmt`. Le gate Rust du fix n'est donc pas annoncé comme vert localement.
|
|
|
|
Aucun smoke réseau ou PostgreSQL n'est pertinent pour ce correctif de compilation Job API.
|
|
|
|
## Gate opérateur demandé
|
|
|
|
```bash
|
|
cargo fmt --all
|
|
python3 scripts/audit_rust_workspace_rules.py
|
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas/0.3.6
|
|
cargo check --workspace
|
|
cargo clippy --workspace --all-targets
|
|
cargo test -p ksp-job-api
|
|
cargo tree -p ksp-job-api --edges normal
|
|
cargo tree -p ksp-job-api -e features
|
|
```
|
|
|
|
Résultat attendu : treize tests unitaires et quatorze canaries d'intégration `ksp-job-api` verts, avec le graphe normal toujours limité à `ksp-core-lib` et aucune feature propre à Job API.
|
|
|
|
## Questions ouvertes
|
|
|
|
Aucune. `pre.004` reste interdit tant que ce gate de fix n'est pas intégralement vert.
|