Skip to content

fix(admin): restore rename_all guard on WorkerRow and pin wire spelling (#1221) - #1291

Merged
avantikonde merged 1 commit into
rewrite/mainfrom
fix/1221-worker-row-rename-all-guard
Nov 29, 2026
Merged

avantikonde merged 1 commit into
rewrite/mainfrom
fix/1221-worker-row-rename-all-guard

Conversation

@avantikonde

Copy link
Copy Markdown
Collaborator

Description

Restores #[serde(rename_all = "camelCase")] on WorkerRow in crates/nostream-admin/src/utils/workers.rs, and adds unit tests that pin the wire spelling of each field and verify camelCase serialization and deserialization.

Related Issue

Closes #1221

Motivation and Context

When WorkerRow gained Deserialize for use in the published status document, it lost its #[serde(rename_all = "camelCase")] attribute. While all current fields were single-word (type, index, enabled, label, heartbeat, monitored, stale), any future multi-word field would serialize as snake_case into artifacts read by the admin console.

Restoring the attribute and adding pinning tests guarantees that the wire format remains camelCase and prevents silent casing drift.

How Has This Been Tested?

  • Added unit tests in crates/nostream-admin/src/utils/workers.rs:
    • worker_row_wire_keys_are_camel_case_and_pinned: pins the exact wire key names and ensures round-trip serialization.
    • worker_row_deserializes_from_camel_case_json: ensures deserialization from camelCase wire JSON.
  • Ran all unit and integration tests across nostream-admin:
    • cargo test -p nostream-admin --lib (56/56 passed)
    • cargo test -p nostream-admin (all 163 passed)
  • Ran formatting and linter checks:
    • cargo fmt --check --package nostream-admin
    • cargo clippy -p nostream-admin --all-targets --all-features -- -D warnings
    • Strict clippy with -D clippy::unwrap_used -D clippy::expect_used

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Nov 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6772feb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4e98d6b-67a6-4aad-b91c-8b5e262520de

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; existing JSON keys remain unchanged.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; existing JSON keys remain unchanged.

Summary

Restores camelCase naming on WorkerRow without changing its current JSON keys.

  • Worker rows use camelCase field names when JSON is written and read.

Reviews (1) · Last reviewed commit: "fix(admin): restore rename_all guard on ..." · Reviewed by Greptile

@avantikonde
avantikonde removed the request for review from chappie-daemon November 29, 2026 19:27
@avantikonde
avantikonde merged commit e582d20 into rewrite/main Nov 29, 2026
19 checks passed
@avantikonde
avantikonde deleted the fix/1221-worker-row-rename-all-guard branch November 29, 2026 19:27
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.

2 participants