feat: bootstrap crate skeleton, deps, and TestError (#1) #19
No reviewers
Labels
No labels
area:assertions
area:cli
area:client
area:harness
area:meta
area:reporting
area:runner
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/ws-rpc-test!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/1-bootstrap-crate-skeleton"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1.
Summary
Bootstraps the crate so subsequent stories have a stable foundation:
clapbehind a default-onclifeature.src/lib.rs: declares the six top-level modules (assert,client,error,harness,report,runner) plus apreludere-exportingTestError,TestResult,ProcessHarness,RpcClient,TestRunner, andserde_json::{json, Value}.src/error.rs: fullTestErrorenum with all six variants —Assertion,Timeout,Connection,RpcError,Skip,Other.TestResultalias.Displayimpl that pretty-prints assertion failures with the expected/got diff and source location.std::error::Errorimpl.From<anyhow::Error>andFrom<tokio_tungstenite::tungstenite::Error>conversions. Five unit tests cover each variant'sDisplay.src/{harness,client,runner}.rs: empty unit-struct stubs namedProcessHarness/RpcClient/TestRunnerso the prelude re-exports compile. Real bodies land in their tickets.src/{assert,report}.rs: empty module placeholders pointing to the issues that will populate them.Checklist (from issue #1)
Cargo.tomldeclares the package and pulls in all required depssrc/lib.rsdeclares the modules andpreludeTestErrorenum with all variants including newSkip(String)pub type TestResult = Result<(), TestError>;Display,Debug,From<anyhow::Error>,From<tungstenite::Error>,std::error::Errorcargo buildandcargo checksucceedcargo docbuilds without warnings (verified locally)Test plan
just qa(fmt-check + clippy-D warnings+ tests) — green locally, 5/5 unit tests passNotes for the reviewer
Skip(String)is new vs the spec body — added per the spec-review §7 finding so tests can opt out at runtime viaErr(TestError::Skip(...)). The runner ticket (#11) wires it up.From<tokio_tungstenite::tungstenite::Error>uses the re-exported tungstenite path to avoid pulling intungsteniteas a separate dependency.harness.rs/client.rs/runner.rsexist purely to make the prelude re-exports compile. Each ticket replaces them with the real type as it lands.Review — bootstrap crate skeleton (#1)
Dépendances (Cargo.toml)
clapoptionnel derrière la featurecli(default-on) — bonne décision pour une lib qui embarque une couche CLI.reqwestavecrustls-tls+default-features = false— correct, évite native-TLS.anyhowest déclaré mais n'est importé nulle part dans le code du framework (la gestion d'erreur repose entièrement surTestError). Si c'est pour être re-exporté côté utilisateur, ça devrait être explicite (pub use anyhow). Sinon c'est une dépendance morte à retirer.Skeleton des modules
preludeposé dès le début — bon choix pour l'ergonomie utilisateur.Aucun bloquant.
✅ Pas de bloquant — bonne fondation. Seul point à clarifier :
anyhowest déclaré en dépendance mais n'est jamais importé dans le code du framework. Soit le re-exporter explicitement (pub use anyhow;) pour les utilisateurs, soit le retirer.