test(verify): extend validation boundary coverage for Worker Hub schemas#286
Conversation
Added comprehensive unit tests for previously uncovered Valibot schemas in Backend-Worker/src/schemas.ts, including: - GasRawFeedSchema (Happy/Sad) - HubErrorSchema (Happy/Sad) - FsErrorSchema (Happy/Sad) - HubStateSchema (Happy/Sad) - RoyaleRiverRace schemas (Happy/Sad) - RoyaleWarLog schemas (Happy/Sad) - RoyaleBattleLog schemas (Happy/Sad) This ensures strict validation at the Worker's external and persistence boundaries, identifying malformed data before it reaches the PWA. Target: Nightly branch. PR Target: Nightly.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Generated by:
.github/prompts/verification.mdReasoning:
[Coverage Gap]:
Backend-Worker/src/schemas.tshad significant gaps in its unit tests, specifically for schemas related to the Worker Hub synchronization (GasRawFeed, HubState, HubError) and several Royale API response structures (RiverRace, WarLog, BattleLog).[Scenarios Added]: Added 25+ new test cases covering both Happy and Sad paths (missing fields, invalid types, picklist violations) for all targeted schemas.
[Rationale]: As the "Integrity Lead", I prioritized the Validation Boundary (Priority 1b) for the Worker Hub, which was recently modified by the Harden agent. Ensuring these boundaries are tested is critical for preventing silent data corruption.
Changes:
GasRawFeedSchema,HubErrorSchema,FsErrorSchema,HubStateSchema, and various Royale API response schemas.Verification:
pnpm test src/src-tests/schemas.spec.tspasses in theBackend-Workerdirectory (46/46 tests passed).Log Updates:
.github/nightly-logs/verification-coverage.logwithBackend-Worker/src/schemas.ts.PR created automatically by Jules for task 8831811349090268309 started by @AlbiDR