Skip to content

cutover endpoint#3118

Open
insipx wants to merge 1 commit intopush-qqtpmktputnyfrom
push-rmpzuuomqxrs
Open

cutover endpoint#3118
insipx wants to merge 1 commit intopush-qqtpmktputnyfrom
push-rmpzuuomqxrs

Conversation

@insipx
Copy link
Contributor

@insipx insipx commented Feb 4, 2026

create an endpoint for the d14n cutover timestamp. closes #3031

@insipx insipx requested a review from a team as a code owner February 4, 2026 20:28
@insipx
Copy link
Contributor Author

insipx commented Feb 4, 2026

This PR is part of a stack of 4 bookmarks:

  1. trunk()
  2. push-qqtpmktputny
  3. push-rmpzuuomqxrs ← this PR
  4. push-zwqsrxnyywwx
  5. push-tlyurqorvnrq

Created with jj-stack

@claude
Copy link

claude bot commented Feb 4, 2026

Claude finished @insipx's task —— View job


Code Review - February 4, 2026 21:20 UTC

  • Read and analyze changed files
  • Review code quality and implementation
  • Check for bugs and security issues
  • Provide feedback

Review Findings

Critical Issue: Type mismatch in Endpoint implementation

In fetch_d14n_cutover.rs:11, the Endpoint trait is implemented incorrectly:

impl Endpoint for FetchD14nCutover {
    type Output = FetchD14nCutover;  // ❌ Wrong - should be FetchD14nCutoverResponse

This should be:

    type Output = FetchD14nCutoverResponse;

Why this matters:

  • The Output associated type should be the response type, not the request struct itself
  • All other endpoints follow this pattern (e.g., GetNodesGetNodesResponse, HealthCheckHealthCheckResponse)
  • This will likely cause compilation errors when the endpoint is actually used, since FetchD14nCutover doesn't implement Message or the necessary response traits
  • The proto definition clearly shows FetchD14nCutoverResponse is the response type with timestamp_ns: u64 field

Proto Cache Enhancement:

The proto_cache.rs changes are well-implemented - adding both input and output type lookups to METHOD_LOOKUP is correct since this endpoint uses pbjson_types::Empty as input (which may be reused across multiple endpoints), making output-type lookup necessary.

Minor: Test Coverage

The ignored test is understandable since the service isn't implemented yet. Consider adding a non-ignored test similar to get_nodes.rs:38-41 that validates the grpc_endpoint() returns the correct path (you already have this at line 28-36, which is good).


@macroscopeapp
Copy link
Contributor

macroscopeapp bot commented Feb 4, 2026

Add FetchD14nCutover endpoint to issue gRPC call to /xmtp.migration.api.v1.D14nMigrationApi/FetchD14nCutover for cutover

Introduce FetchD14nCutover with an empty pbjson_types::Empty request, export it from the d14n module, add xmtp.migration.api.v1 generated types, and update METHOD_LOOKUP to resolve by input or output type.

📍Where to Start

Start with the endpoint definition in fetch_d14n_cutover.rs.


📊 Macroscope summarized 26d963d. 4 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted. View details

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 61.53846% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.21%. Comparing base (f014a8d) to head (26d963d).

Files with missing lines Patch % Lines
..._api_d14n/src/endpoints/d14n/fetch_d14n_cutover.rs 44.44% 10 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           push-qqtpmktputny    #3118      +/-   ##
=====================================================
+ Coverage              74.11%   74.21%   +0.09%     
=====================================================
  Files                    448      449       +1     
  Lines                  55717    55741      +24     
=====================================================
+ Hits                   41297    41367      +70     
+ Misses                 14420    14374      -46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@insipx insipx mentioned this pull request Feb 4, 2026
pub struct FetchD14nCutover;

impl Endpoint for FetchD14nCutover {
type Output = FetchD14nCutover;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium

d14n/fetch_d14n_cutover.rs:11 Output should be FetchD14nCutoverResponse, not FetchD14nCutover. This will cause deserialization failures when decoding the gRPC response.

Suggested change
type Output = FetchD14nCutover;
type Output = FetchD14nCutoverResponse;

🚀 Want me to fix this? Reply ex: "fix it for me".

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