Skip to content

fix(wire-format): flip sistent consumer reads of meshery wire to canonical camelCase (Phase 7c)#1445

Merged
leecalcote merged 1 commit intomasterfrom
chore/canonical-sistent-flip
Apr 29, 2026
Merged

fix(wire-format): flip sistent consumer reads of meshery wire to canonical camelCase (Phase 7c)#1445
leecalcote merged 1 commit intomasterfrom
chore/canonical-sistent-flip

Conversation

@leecalcote
Copy link
Copy Markdown
Member

Summary

Sistent components consume meshery / meshery-cloud wire payloads. Per the ecosystem identifier-naming contract (TypeScript property: camelCase everywhere, see meshery/schemas docs/identifier-naming-contributor-guide.md), consumer reads must match the canonical camelCase wire keys that meshery-cloud emits post Phase 4. This change is a surgical field-rename sweep — no behavioural or structural changes.

This is the sistent half of Phase 7c.

Flipped (45 sites across 20 files)

Catalog / design wire (Pattern, MesheryPattern, CatalogContent):

  • catalog_datacatalogData
  • content_classcontentClass
  • published_versionpublishedVersion
  • pattern_filepatternFile

Pagination wire (MesheryViewPage / TeamsPage / EnvironmentsPage / DesignsPage / UsersPage / EventsPage):

  • total_counttotalCount

Role wire (Role):

  • role_nameroleName — response read in InviteUserModal only. The order: 'role_name asc' request parameter is left as-is until the cloud server adds dual-accept on the sort key.

Component / model wire (Component):

  • display_namedisplayName

Files changed

  • src/custom/CustomCatalog/CustomCard.tsxPattern interface and reads
  • src/custom/CustomCatalog/Helper.tsgetVersion() reads
  • src/custom/CatalogDetail/OverviewSection.tsx
  • src/custom/CatalogDetail/RelatedDesigns.tsx
  • src/custom/CatalogDetail/LeftPanel.tsx
  • src/custom/CatalogDetail/CaveatsSection.tsx
  • src/custom/CatalogDetail/ActionButton.tsx
  • src/custom/CatalogCard/CatalogCard.tsx
  • src/custom/PerformersSection/PerformersSection.tsx
  • src/custom/Workspaces/WorkspaceTeamsTable.tsx
  • src/custom/Workspaces/WorkspaceViewsTable.tsx
  • src/custom/Workspaces/EnvironmentTable.tsx
  • src/custom/Workspaces/WorkspaceRecentActivityModal.tsx — also flipped local EventsResponse type
  • src/custom/Workspaces/DesignTable.tsx
  • src/custom/Workspaces/hooks/useDesignAssignment.tsx
  • src/custom/Workspaces/hooks/useEnvironmentAssignment.tsx
  • src/custom/Workspaces/hooks/useTeamAssignment.tsx
  • src/custom/Workspaces/hooks/useViewsAssignment.tsx
  • src/custom/UsersTable/UsersTable.tsxtotalCount only
  • src/custom/DashboardWidgets/GettingStartedWidget/InviteUserModal.tsx

Intentionally retained as sistent-internal contract (not meshery wire)

  • src/hooks/useRoomActivity.tsprovider_url, data.user_map are sistent's collaboration WebSocket signaling protocol identifiers, not meshery wire fields. The signaling server (meshery-cloud collaboration endpoint) speaks this protocol with sistent and is independent of the REST API wire-format contract.
  • src/custom/CollaboratorAvatarGroup/CollaboratorAvatarGroup.tsxUser.border_color is part of sistent's exported Users prop shape (the sistent API surface that consumers pass in). Flipping this would be a public API break, not a wire-format alignment.

Already retained-as-deferred per prior phases (no change in this PR)

  • src/custom/UsersTable/UsersTable.tsxfullUser.organization_with_user_roles?.role_names deferred until the containing response type is migrated upstream (existing inline TODO).
  • src/custom/TeamTable/TeamTableConfiguration.tsxteam_names / team_name deferred until meshery-cloud bulk-delete handler lands dual-accept on the request body (existing decision from PR fix(schemas): Phase 2.K — align Sistent with canonical camelCase wire format #1431 / cascade-10).

Test plan

  • npx tsc --noEmit — no new errors vs baseline of 105 pre-existing errors (all unrelated: missing @types/jest, @types/node, @types/js-yaml, @sistent/mui-datatables declaration, etc.).
  • npm run lint — clean.
  • npm test — 21/21 tests passing across 7 suites.
  • npm run buildtsup build succeeds (CJS + ESM + DTS).
  • Final grep sweep confirms no remaining snake_case wire-format reads in scope. The four retained reads (useRoomActivity user_map, CollaboratorAvatarGroup border_color, UsersTable organization_with_user_roles.role_names, TeamTableConfiguration team_names/team_name) are documented above with rationale.

Refs

…nical camelCase (Phase 7c)

Sistent components consume meshery / meshery-cloud wire payloads. Per the
ecosystem identifier-naming contract (TypeScript property: camelCase
everywhere, see meshery/schemas docs/identifier-naming-contributor-guide.md),
the consumer reads must match the canonical camelCase wire keys that
meshery-cloud emits post Phase 4. This change is a surgical field-rename
sweep — no behavioural or structural change.

Flipped (45 sites across 20 files):

  Catalog / design wire (Pattern, MesheryPattern, CatalogContent):
    catalog_data        → catalogData
    content_class       → contentClass
    published_version   → publishedVersion
    pattern_file        → patternFile

  Pagination wire (MesheryViewPage / TeamsPage / EnvironmentsPage /
  DesignsPage / UsersPage / EventsPage):
    total_count         → totalCount

  Role wire (Role):
    role_name           → roleName  (response read in InviteUserModal only;
                                     the `order: 'role_name asc'` request
                                     parameter is left as-is until the cloud
                                     server adds dual-accept on the sort key)

  Component / model wire (Component):
    display_name        → displayName

Files touched:
  • src/custom/CustomCatalog/CustomCard.tsx        — Pattern interface
  • src/custom/CustomCatalog/Helper.ts             — getVersion() reads
  • src/custom/CatalogDetail/OverviewSection.tsx
  • src/custom/CatalogDetail/RelatedDesigns.tsx
  • src/custom/CatalogDetail/LeftPanel.tsx
  • src/custom/CatalogDetail/CaveatsSection.tsx
  • src/custom/CatalogDetail/ActionButton.tsx
  • src/custom/CatalogCard/CatalogCard.tsx
  • src/custom/PerformersSection/PerformersSection.tsx
  • src/custom/Workspaces/WorkspaceTeamsTable.tsx
  • src/custom/Workspaces/WorkspaceViewsTable.tsx
  • src/custom/Workspaces/EnvironmentTable.tsx
  • src/custom/Workspaces/WorkspaceRecentActivityModal.tsx
                                                    (also flipped
                                                     EventsResponse type)
  • src/custom/Workspaces/DesignTable.tsx
  • src/custom/Workspaces/hooks/useDesignAssignment.tsx
  • src/custom/Workspaces/hooks/useEnvironmentAssignment.tsx
  • src/custom/Workspaces/hooks/useTeamAssignment.tsx
  • src/custom/Workspaces/hooks/useViewsAssignment.tsx
  • src/custom/UsersTable/UsersTable.tsx           — totalCount only
  • src/custom/DashboardWidgets/GettingStartedWidget/InviteUserModal.tsx

Intentionally retained (sistent-internal contracts, not meshery wire):

  • src/hooks/useRoomActivity.ts — `provider_url`, `data.user_map` are
    sistent's collaboration WebSocket signaling protocol identifiers, not
    meshery wire fields. The signaling server (meshery-cloud collaboration
    endpoint) speaks this protocol with sistent and is independent of the
    REST API wire-format contract.

  • src/custom/CollaboratorAvatarGroup/CollaboratorAvatarGroup.tsx
    `User.border_color` is part of sistent's exported `Users` prop shape
    (the sistent API surface that consumers pass in). Flipping this would
    be a public API break, not a wire-format alignment.

Already retained-as-deferred per prior phases (still deferred, no change):

  • src/custom/UsersTable/UsersTable.tsx — `fullUser.organization_with_user_roles?.role_names`
    deferred until the containing response type is migrated upstream
    (existing inline TODO).

  • src/custom/TeamTable/TeamTableConfiguration.tsx — `team_names` /
    `team_name` deferred until meshery-cloud bulk-delete handler lands
    dual-accept on the request body (existing PR #1431 / cascade-10
    decision).

Verified locally: tsc --noEmit (no new errors vs baseline of 105
pre-existing errors), npm run lint (clean), npm test (21/21 passing),
npm run build (success).

Refs: meshery/schemas docs/identifier-naming-contributor-guide.md
Signed-off-by: Lee Calcote <leecalcote@gmail.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@leecalcote leecalcote merged commit 4b0c8a6 into master Apr 29, 2026
5 checks passed
@leecalcote leecalcote deleted the chore/canonical-sistent-flip branch April 29, 2026 03:20
@leecalcote
Copy link
Copy Markdown
Member Author

Phase 8a Post-Release Integration Validation Results — 2026-04-28

Ran an end-to-end validation against the v1.0.14 / sistent v0.20.1 / meshkit v1.0.7 / schemas v1.2.6 ecosystem. Overall: GREEN with two follow-up findings, neither blocking.

What passed

  • Builds: meshery-cloud go build ./server/..., meshery go build ./..., meshkit go build ./..., sistent npm run build — all clean.
  • Go server unit tests: meshery (22 packages), meshkit (all packages) — all pass. meshery-cloud all packages pass except one DAO test (Finding [chore] Migrate Storybook from Meshery to Sistent repo #2 below).
  • UI tests: meshery-cloud/ui jest — 92 suites / 650 tests pass; meshery/ui vitest — 5 suites / 34 tests pass; sistent jest — 21 suites / 63 tests pass.
  • Type checks: meshery-cloud/ui & meshery/ui pass clean. sistent has 10 pre-existing type errors in theme/palette.ts and tsup.config.ts (last touched 2025-09, unrelated to this overhaul).
  • Schema audit: make validate-schemas and consumer-audit both report zero blocking violations — the canonical-casing migration is clean across all consumers.

Two findings (both follow-up, neither blocking)

Finding #1 — Schemas pin drift (HIGH-COORDINATION): All three Go modules (meshery-cloud, meshery, meshkit) pin github.com/meshery/schemas v1.2.2 while the published tag is v1.2.6. The cloud integration test TestPublishedDocsOpenAPIVersionNotAhead correctly catches this:

docs openapi.yml version v1.2.6 is ahead of repo schemas pin v1.2.2

Runtime is fine — the canonical-casing migration was implemented in consumers via local-flip PRs and v1.2.3..v1.2.6 doesn't break the v1.2.2 ABI — but the schema-driven contract demands consumers track the latest. Suggested hotfix: one PR per Go repo bumping schemas v1.2.2 → v1.2.6 + go mod tidy, dispatched in order schemas → meshkit → meshery-cloud → meshery.

Finding #2 — Seeder-bypass NULL joined_at (MEDIUM-MAINTENANCE): make db-user-init invokes the legacy SQL function public.create_and_assign_my_team(uuid) (defined in the 2019 initial-schema migration) which inserts into users_teams_mappings without the new joined_at column. The Go DAO path (AddUserToTeam, CreateTeamAndAssignToUser) correctly stamps joined_at, but the SQL bypass leaves 7 NULL rows on every fresh seed. The migration 20260424000002_add_users_teams_mappings_joined_at backfills idempotently on next server boot, so production self-heals — but the DAO test TestUsersTeamsMappingsJoinedAtBackfilled fails on freshly-seeded test DBs until a server start sweeps the NULL rows. Suggested hotfix: CREATE OR REPLACE FUNCTION public.create_and_assign_my_team(...) in a new migration adding joined_at to the INSERT column list and now() to the values list.

Out-of-scope follow-ups (not regressions)

  • Sistent module-augmentation type errors in palette.ts (pre-existing since 2025-09).
  • make db-init does not create/migrate the kratos & hydra Postgres DBs — every new developer hits this on integration-test runs. Worth wiring into db-init or documenting in docs/development.md.
  • 60+ duplicate code 'NNNN' - skipping export warnings from make error (pre-existing, benign).

Verdict

Ship v1.0.14 as-is. Plan a v1.0.15 hotfix bundling the schemas-pin bump and the SQL-function fix. Both fixes total <20 lines each. The canonical-casing migration is clean per the consumer-audit — the most important contract gate the user-facing audit could check.

Full report: /tmp/phase8a-validation-report.md on the validation host.

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.

1 participant