v0.2.14-pre.003
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!-- file: docs/plans/021-V0_2_14_PROGRAM_API_PLAN.md -->
|
||||
<!-- version: 2 -->
|
||||
<!-- version: 3 -->
|
||||
|
||||
# Plan `0.2.14` — Program API foundation
|
||||
|
||||
@@ -541,7 +541,7 @@ Baseline, règles/architecture, héritage, ownership, API candidate, dependency
|
||||
|
||||
### `pre.002` — Scaffold `ksp-program-api` + façade + firewall
|
||||
|
||||
**Statut : matérialisé ; gate opérateur à confirmer.**
|
||||
**Statut : réalisé ; gate opérateur intégralement PASS.**
|
||||
|
||||
La crate est membre du workspace avec exactement `ksp-core-lib` et `ksp-interface-lib` comme dépendances normales. Le crate-root réexporte `Error`, `ErrorCode`, `ErrorContext`, `Result`, `Pubkey`, `ProgramAccountMeta` et `ProgramInstruction`. README/USAGE initiaux et canaris `public_api` / `dependency_boundary` sont présents.
|
||||
|
||||
@@ -549,7 +549,9 @@ Aucun trait decoder, recognition, outcome, registry, codec, runtime logging ou e
|
||||
|
||||
### `pre.003` — Recognition + outcome minimal
|
||||
|
||||
Introduire `ProgramInstructionRecognition` et `ProgramInstructionDecodeOutcome<Decoded>` avec invariants et Debug sûr. Aucun descriptor/registry.
|
||||
**Statut : matérialisé ; gate opérateur à confirmer.**
|
||||
|
||||
`ProgramInstructionRecognition` et `ProgramInstructionDecodeOutcome<Decoded>` sont ajoutés dans un module privé puis réexportés depuis le crate-root. Les deux enums sont `#[non_exhaustive]`. Le `Debug` de l'outcome est manuel, ne requiert pas `Decoded: Debug` et n'affiche jamais la valeur décodée. Aucun descriptor, registry ou trait decoder n'est avancé.
|
||||
|
||||
### `pre.004` — `ProgramInstructionDecoder` + external implementation
|
||||
|
||||
@@ -599,6 +601,27 @@ dependency firewall canary présent
|
||||
|
||||
`pre.003` reste limité à `ProgramInstructionRecognition` et `ProgramInstructionDecodeOutcome<Decoded>` avec leur sémantique et leur Debug sûr. Le trait decoder reste réservé à `pre.004`.
|
||||
|
||||
## 13.2 État préparé après `pre.003`
|
||||
|
||||
Le gate opérateur `pre.002` fourni le 28 août 2026 est intégralement vert : audits Rust/Markdown, check, Clippy, tests de `ksp-program-api`, workspace complet et graphes Cargo ont été exécutés. Le graphe normal ciblé reste exactement `Core + Interface`.
|
||||
|
||||
La tranche `pre.003` matérialise :
|
||||
|
||||
```text
|
||||
ProgramInstructionRecognition NoMatch / ProgramMatch / ExactMatch
|
||||
ProgramInstructionDecodeOutcome<T> Decoded(T) / Unsupported
|
||||
non_exhaustive oui sur les deux enums
|
||||
Debug recognition payload-free par construction
|
||||
Debug outcome opaque, sans bound T: Debug
|
||||
Failed / Ignored absents
|
||||
priority / confidence / proof absents de la surface
|
||||
ProgramInstructionDecoder absent par contrat pre.003
|
||||
registry / canonical payload / preparer absents
|
||||
normal dependencies inchangées : Core + Interface
|
||||
```
|
||||
|
||||
Les tests unitaires vérifient notamment qu'un type décodé externe dépourvu de `Debug` peut être contenu et formaté via l'outcome sans exposer sa valeur. Le passage à `pre.004` reste conditionné au gate opérateur de cet overlay.
|
||||
|
||||
## 14. Hors périmètre confirmé
|
||||
|
||||
```text
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- file: docs/validation/017-V0_2_14_PROGRAM_API.md -->
|
||||
<!-- version: 2 -->
|
||||
<!-- version: 3 -->
|
||||
|
||||
# Validation `0.2.14` — Program API foundation
|
||||
|
||||
@@ -37,8 +37,8 @@ Le scope validé par `pre.001` est une foundation instruction-only avec output a
|
||||
|
||||
| Contrat | Décision `pre.001` | Gate futur |
|
||||
|--------------------------------------------|---------------------------------------------------------|--------------------------------|
|
||||
| `ProgramInstructionRecognition` | `NoMatch / ProgramMatch / ExactMatch`, non exhaustif | `pre.003` |
|
||||
| `ProgramInstructionDecodeOutcome<Decoded>` | `Decoded(Decoded) / Unsupported`, non exhaustif | `pre.003` |
|
||||
| `ProgramInstructionRecognition` | `NoMatch / ProgramMatch / ExactMatch`, non exhaustif | PASS `pre.003` |
|
||||
| `ProgramInstructionDecodeOutcome<Decoded>` | `Decoded(Decoded) / Unsupported`, non exhaustif | PASS `pre.003` |
|
||||
| decoder failure | `ksp_core_lib::Result`, aucun statut `Failed` parallèle | `pre.003` / `pre.004` |
|
||||
| `ProgramInstructionDecoder` | `Send + Sync`, associated `Decoded` | `pre.004` |
|
||||
| input | `&ProgramInstruction` | `pre.004` |
|
||||
@@ -105,8 +105,8 @@ tracing
|
||||
| unknown Program Pubkey | utilisable sans registry Core | PENDING |
|
||||
| max Interface input | decoder consomme l'input déjà borné sans nouvelle allocation obligatoire | PENDING |
|
||||
| malformed program payload | `Err` ou `Unsupported` selon contrat, sans payload dans l'erreur | PENDING |
|
||||
| Debug recognition | aucun payload | PENDING |
|
||||
| Debug outcome | contenu `Decoded` non rendu automatiquement | PENDING |
|
||||
| Debug recognition | aucun payload | PASS |
|
||||
| Debug outcome | contenu `Decoded` non rendu automatiquement | PASS |
|
||||
| default methods | aucun default method susceptible de masquer panic/policy | PENDING |
|
||||
| closed-world enum | aucun inventaire central de Program kinds | PENDING |
|
||||
| serde accidental | aucune dependency/derive | PENDING |
|
||||
@@ -157,25 +157,37 @@ prompt de démarrage 0.3.1
|
||||
delta de la prerelease
|
||||
```
|
||||
|
||||
## 8. État préparé `pre.002`
|
||||
## 8. Gate opérateur `pre.002`
|
||||
|
||||
Le scaffold matérialisé est :
|
||||
Le gate fourni le 28 août 2026 est intégralement vert :
|
||||
|
||||
```text
|
||||
workspace member PASS structurel
|
||||
normal dependencies ksp-core-lib + ksp-interface-lib uniquement
|
||||
crate-root facade Error/ErrorCode/ErrorContext/Result/Pubkey + Interface instruction types
|
||||
public modules aucun
|
||||
README / USAGE présents
|
||||
public API canary présent
|
||||
dependency firewall canary présent
|
||||
ProgramInstructionRecognition absent par contrat pre.002
|
||||
ProgramInstructionDecodeOutcome absent par contrat pre.002
|
||||
ProgramInstructionDecoder absent par contrat pre.002
|
||||
registry / canonical payload / preparer absents
|
||||
serde / codecs / runtime logging absents
|
||||
cargo fmt --all PASS
|
||||
audit Rust général / exports / workspace PASS
|
||||
audit Markdown PASS — 170 tables / 119 fichiers
|
||||
cargo check --workspace PASS
|
||||
cargo clippy --workspace --all-targets PASS
|
||||
cargo test -p ksp-program-api PASS — 4 tests d'intégration
|
||||
cargo test --workspace PASS
|
||||
cargo tree -p ksp-program-api --edges normal PASS — Core + Interface uniquement
|
||||
cargo tree --duplicates exécuté, inventaire workspace observé
|
||||
```
|
||||
|
||||
Le gate opérateur `pre.001` fourni le 28 août 2026 est vert pour `cargo fmt --all`, audits Rust/Markdown, `cargo check --workspace` et Clippy workspace.
|
||||
Ce gate autorise l'ouverture de `pre.003`.
|
||||
|
||||
Le passage à `pre.003` reste conditionné au gate opérateur de cet overlay. Les preuves recognition/outcome restent `PENDING` jusqu'à leur tranche dédiée.
|
||||
## 9. État préparé `pre.003`
|
||||
|
||||
| Critère | Statut | Preuve |
|
||||
|--------------------------------------|--------|----------------------------------------------------------------------|
|
||||
| `ProgramInstructionRecognition` | PASS | enum non exhaustif `NoMatch / ProgramMatch / ExactMatch` |
|
||||
| `ProgramInstructionDecodeOutcome<T>` | PASS | enum non exhaustif `Decoded(T) / Unsupported` |
|
||||
| absence de `Failed` / `Ignored` | PASS | échec réservé au futur `Result`; aucun statut parallèle |
|
||||
| Debug recognition | PASS | enum sans payload; Debug dérivé |
|
||||
| Debug outcome | PASS | implémentation manuelle sans `T: Debug`, valeur `Decoded` non rendue |
|
||||
| dépendances normales | PASS | manifest inchangé : `ksp-core-lib` + `ksp-interface-lib` |
|
||||
| module public | PASS | aucun `pub mod`; exports crate-root uniquement |
|
||||
| `ProgramInstructionDecoder` | ABSENT | réservé à `pre.004` |
|
||||
| registry / descriptor / payload D3 | ABSENT | hors scope maintenu |
|
||||
| serde / codec / logging / runtime | ABSENT | dependency firewall maintenu |
|
||||
|
||||
Les canaris unitaires et publics de `pre.003` doivent passer avant d'ouvrir `pre.004`. La preuve d'implémentation externe, le Program Pubkey open-world et l'associated output complet restent réservés au trait decoder de la tranche suivante.
|
||||
|
||||
Reference in New Issue
Block a user