WVDSH-1924: Add achievement list command - #49
Conversation
|
Updated E2E after review fixes. The test achievement was created without |
|
Claude finished @cloud9c's task in 3m 40s —— View job Code review
The command is well-built and lines up almost exactly with Findings1.
// src/config.rs:284
fn print_override_notice(text: &str) {
println!("{} {}", "env override:".yellow(), text);
}So This is new here rather than pre-existing: 2. A document missing any of them fails the entire 3. Test coverage gap — Both deserialize/serialize tests use an achievement with a stat link. The no-stat-link case — the common one, and the one your E2E actually ran — is only covered on the serialize side. Suggested test in the inline comment. 4. Parses correctly (expression position), but reads as though 5. Two near-identical structs with no note on the split invites someone merging them back later. The rest of this file is generous with rationale comments, so it'd fit the local style. 6. The E2E output in the PR description is stale (note) It shows What I could not verify
I've left the details as inline comments on the relevant lines. |
| description: String, | ||
| image: String, | ||
| secret: bool, |
There was a problem hiding this comment.
description, image, and secret are required for deserialization, so any achievement document missing one of them fails the whole list call with a raw serde error rather than degrading gracefully.
Your E2E run confirms today's backend returns "image": "" even for an achievement created without one, so this works right now. But handle_achievement_create only sets image when --image is passed, so the field being present at all depends entirely on a backend default — and older documents (or ones written by a different code path) may not have it.
Cheap hardening:
| description: String, | |
| image: String, | |
| secret: bool, | |
| #[serde(default)] | |
| description: String, | |
| #[serde(default)] | |
| image: String, | |
| #[serde(default)] | |
| secret: bool, |
Your parses_the_achievement_list_response test would still pass, and a follow-up test with a minimal document would lock the behavior in.
There was a problem hiding this comment.
The backend contract requires description, image, and secret: the Convex storage schema and API return validator use non-optional validators, and optional write inputs are normalized before storage (image ?? '', imported description ?? '', secret ?? false). I am intentionally keeping the Rust fields required so a backend contract regression fails visibly rather than being silently defaulted.
|
Claude finished @cloud9c's task in 3m 28s —— View job Code review
Re-reviewed after Finding
The validator itself is still pinned — if Previously raised, now resolved
Notes
What I could not verify
|
|
Claude finished @cloud9c's task in 6m 11s —— View job Code review
Re-reviewed after Last round's finding, confirmed fixed
What else I re-checked and cleared
One residual note, not a finding
The E2E block in the PR description is now current — it shows Nothing blocking from my side. |
|
Claude finished @cloud9c's task in 2m 22s —— View job Code review
Re-reviewed at What the merge brought in, and why it doesn't touch this PR
Previously raised, all still resolved
Also re-checked and clear
What I could not verify
Nothing blocking from my side. |
franzwarning
left a comment
There was a problem hiding this comment.
looks good assuming list achievements backend endpoint is live, merge if it is
Summary
wavedash achievement list--jsonfor scripted usage, including image keys--game-id/ config resolution behaviorLinear
WVDSH-1924 — Add CLI command to list achievements
Backend dependency
This CLI command uses the new authenticated
GET /api/games/{gameId}/achievementsendpoint introduced by the backend PR.Testing
cargo clippy --all-targets -- -D warningscargo test(63 passed)cargo run -- achievement list --helpWAVEDASH_GAME_ID=… wavedash-dev achievement list --json | jq 'map(.identifier)'git diff --check