v0.2.14-pre.005-fix.001
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# file: Cargo.toml
|
||||
# version: 317
|
||||
# version: 318
|
||||
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = ["crates/ksp-app-config-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-wallet-lib"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.2.14-pre.5"
|
||||
version = "0.2.14-pre.5.fix.1"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-program-api/tests/release_completeness.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Release-level completeness canaries for the `0.2.14` Program API foundation.
|
||||
|
||||
@@ -67,11 +67,7 @@ fn pre_005_production_module_inventory_is_instruction_only() -> std::io::Result<
|
||||
|
||||
#[test]
|
||||
fn pre_005_public_enum_and_trait_inventory_remains_open_world() {
|
||||
let sources = [
|
||||
include_str!("../src/lib.rs"),
|
||||
include_str!("../src/program_instruction_decode.rs"),
|
||||
include_str!("../src/program_instruction_decoder.rs"),
|
||||
];
|
||||
let sources = [include_str!("../src/lib.rs"), include_str!("../src/program_instruction_decode.rs"), include_str!("../src/program_instruction_decoder.rs")];
|
||||
let mut public_enums = std::vec::Vec::new();
|
||||
let mut public_traits = std::vec::Vec::new();
|
||||
for source in sources {
|
||||
@@ -87,10 +83,7 @@ fn pre_005_public_enum_and_trait_inventory_remains_open_world() {
|
||||
}
|
||||
public_enums.sort_unstable();
|
||||
public_traits.sort_unstable();
|
||||
assert_eq!(
|
||||
public_enums,
|
||||
std::vec!["pub enum ProgramInstructionDecodeOutcome<Decoded> {", "pub enum ProgramInstructionRecognition {"]
|
||||
);
|
||||
assert_eq!(public_enums, std::vec!["pub enum ProgramInstructionDecodeOutcome<Decoded> {", "pub enum ProgramInstructionRecognition {"]);
|
||||
assert_eq!(public_traits, std::vec!["pub trait ProgramInstructionDecoder: Send + Sync {"]);
|
||||
let decode_source = include_str!("../src/program_instruction_decode.rs");
|
||||
assert!(decode_source.contains("#[non_exhaustive]\npub enum ProgramInstructionRecognition"));
|
||||
@@ -100,11 +93,8 @@ fn pre_005_public_enum_and_trait_inventory_remains_open_world() {
|
||||
|
||||
#[test]
|
||||
fn pre_005_production_sources_have_no_registry_preparer_codec_or_runtime_creep() {
|
||||
let sources = [
|
||||
include_str!("../src/lib.rs"),
|
||||
include_str!("../src/program_instruction_decode.rs"),
|
||||
include_str!("../src/program_instruction_decoder.rs"),
|
||||
];
|
||||
let direct_tracing_path = ["tracing", "::"].concat();
|
||||
let sources = [include_str!("../src/lib.rs"), include_str!("../src/program_instruction_decode.rs"), include_str!("../src/program_instruction_decoder.rs")];
|
||||
for source in sources {
|
||||
for forbidden in [
|
||||
"pub enum ProgramKind",
|
||||
@@ -120,7 +110,6 @@ fn pre_005_production_sources_have_no_registry_preparer_codec_or_runtime_creep()
|
||||
"bincode::",
|
||||
"wincode::",
|
||||
"ksp_logging_lib::",
|
||||
"tracing::",
|
||||
"reqwest::",
|
||||
"tokio::",
|
||||
"tonic::",
|
||||
@@ -133,6 +122,7 @@ fn pre_005_production_sources_have_no_registry_preparer_codec_or_runtime_creep()
|
||||
] {
|
||||
assert!(!source.contains(forbidden), "forbidden Program API production surface detected: {forbidden}");
|
||||
}
|
||||
assert!(!source.contains(direct_tracing_path.as_str()), "forbidden Program API production direct tracing path detected");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
128
deltas/0.2.14/pre.005-fix.001.md
Normal file
128
deltas/0.2.14/pre.005-fix.001.md
Normal file
@@ -0,0 +1,128 @@
|
||||
<!-- file: deltas/0.2.14/pre.005-fix.001.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta `0.2.14-pre.005-fix.001` — faux positif du canari logging
|
||||
|
||||
## 1. Base requise
|
||||
|
||||
Ce correctif s'applique exclusivement après :
|
||||
|
||||
```text
|
||||
0.2.14-pre.005
|
||||
```
|
||||
|
||||
Le gate opérateur du 28 août 2026 confirme :
|
||||
|
||||
```text
|
||||
cargo fmt --all PASS
|
||||
audit Rust général / exports / workspace PASS
|
||||
audit Markdown PASS — 173 tables / 122 fichiers
|
||||
cargo check --workspace PASS
|
||||
cargo clippy --workspace --all-targets PASS
|
||||
cargo test -p ksp-program-api PASS — 18 tests Rust
|
||||
cargo test --workspace FAIL — ksp-logging-lib/tests/ownership.rs
|
||||
```
|
||||
|
||||
L'unique échec observé est :
|
||||
|
||||
```text
|
||||
crates/ksp-program-api/tests/release_completeness.rs bypasses ksp-logging-lib via tracing
|
||||
```
|
||||
|
||||
## 2. Diagnostic
|
||||
|
||||
`release_completeness.rs` doit vérifier que les sources de production Program API ne contiennent aucun chemin direct vers tracing. Le canari écrivait cependant lui-même ce chemin sous forme de chaîne littérale dans sa liste de motifs interdits.
|
||||
|
||||
Le scanner workspace de `ksp-logging-lib/tests/ownership.rs` inspecte tous les fichiers Rust des autres crates, tests d'intégration compris, et recherche textuellement ce chemin. Il classait donc le motif de test lui-même comme un bypass alors qu'aucune dépendance, importation ou utilisation de tracing n'existe dans `ksp-program-api`.
|
||||
|
||||
Le graphe normal observé reste :
|
||||
|
||||
```text
|
||||
ksp-program-api
|
||||
├── ksp-core-lib
|
||||
└── ksp-interface-lib
|
||||
└── ksp-core-lib
|
||||
```
|
||||
|
||||
## 3. Correction
|
||||
|
||||
Le canari conserve exactement la même interdiction sur les sources de production, mais construit désormais le motif recherché à partir de deux fragments. Son propre fichier ne contient donc plus le chemin direct littéral que le scanner logging doit légitimement refuser.
|
||||
|
||||
Aucune règle logging n'est contournée ou affaiblie. Le scanner de `ksp-logging-lib` reste inchangé.
|
||||
|
||||
Comme un fichier `.rs` est modifié, `VER-ID-007` et `VER-ID-010` imposent :
|
||||
|
||||
```text
|
||||
workspace.package.version = 0.2.14-pre.5.fix.1
|
||||
```
|
||||
|
||||
La livraison est :
|
||||
|
||||
```text
|
||||
0.2.14-pre.005-fix.001
|
||||
```
|
||||
|
||||
## 4. Fichiers modifiés
|
||||
|
||||
```text
|
||||
Cargo.toml
|
||||
crates/ksp-program-api/tests/release_completeness.rs
|
||||
```
|
||||
|
||||
## 5. Fichier ajouté
|
||||
|
||||
```text
|
||||
deltas/0.2.14/pre.005-fix.001.md
|
||||
```
|
||||
|
||||
## 6. Fichiers volontairement inchangés
|
||||
|
||||
```text
|
||||
crates/ksp-program-api/src/**
|
||||
crates/ksp-program-api/Cargo.toml
|
||||
crates/ksp-program-api/tests/security_hardening.rs
|
||||
crates/ksp-logging-lib/**
|
||||
docs/plans/**
|
||||
docs/validation/**
|
||||
README.md
|
||||
ROADMAP.md
|
||||
CHANGELOG.md
|
||||
prompts/**
|
||||
```
|
||||
|
||||
## 7. Scope négatif
|
||||
|
||||
Ce fix n'ajoute aucun :
|
||||
|
||||
```text
|
||||
contrat Program
|
||||
trait ou type public
|
||||
dependency
|
||||
logging runtime
|
||||
registry
|
||||
descriptor
|
||||
codec
|
||||
payload D3
|
||||
preparer
|
||||
```
|
||||
|
||||
## 8. Validations de génération
|
||||
|
||||
Les audits statiques disponibles dans l'environnement de génération doivent rester propres. Cargo n'y est pas disponible ; aucun PASS Cargo n'est revendiqué par ce delta.
|
||||
|
||||
## 9. Gate opérateur attendu
|
||||
|
||||
```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.2.14
|
||||
cargo check --workspace
|
||||
cargo clippy --workspace --all-targets
|
||||
cargo test -p ksp-program-api
|
||||
cargo test -p ksp-logging-lib --test ownership
|
||||
cargo test --workspace
|
||||
cargo tree -p ksp-program-api --edges normal
|
||||
cargo tree --duplicates
|
||||
```
|
||||
|
||||
Si ce gate est vert, `pre.005` est considéré corrigé et `pre.006` peut ouvrir le gate technique final sans développement fonctionnel.
|
||||
Reference in New Issue
Block a user