Skip to content

test(verify): extend validation boundary coverage for Worker Hub schemas#286

Merged
github-actions[bot] merged 1 commit intoNightlyfrom
verify-worker-schemas-8831811349090268309
Mar 23, 2026
Merged

test(verify): extend validation boundary coverage for Worker Hub schemas#286
github-actions[bot] merged 1 commit intoNightlyfrom
verify-worker-schemas-8831811349090268309

Conversation

@google-labs-jules
Copy link
Contributor

Generated by: .github/prompts/verification.md

Reasoning:

[Coverage Gap]: Backend-Worker/src/schemas.ts had 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:

  • [Backend-Worker/src/src-tests/schemas.spec.ts]: Added tests for GasRawFeedSchema, HubErrorSchema, FsErrorSchema, HubStateSchema, and various Royale API response schemas.

Verification:

  • [Automated]: Confirmed pnpm test src/src-tests/schemas.spec.ts passes in the Backend-Worker directory (46/46 tests passed).

Log Updates:

  • Updated .github/nightly-logs/verification-coverage.log with Backend-Worker/src/schemas.ts.

PR created automatically by Jules for task 8831811349090268309 started by @AlbiDR

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.
@google-labs-jules
Copy link
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions bot merged commit b58accd into Nightly Mar 23, 2026
1 check passed
@github-actions github-actions bot deleted the verify-worker-schemas-8831811349090268309 branch March 23, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants