Skip to content

fix(sdk): preserve Ledger V1 info during composition - #2016

Merged
Dav-14 merged 1 commit into
mainfrom
codex/preserve-ledger-v1-info
Nov 5, 2026
Merged

Dav-14 merged 1 commit into
mainfrom
codex/preserve-ledger-v1-info

Conversation

@Dav-14

@Dav-14 Dav-14 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Restore Ledger.V1.GetInfo in the composed SDK while retaining Ledger.V3.Info. Stack #2007 removed the V1 operation when adding V3 because both use GET /api/ledger/_info with different response models.

Keep both source operations and let Speakeasy represent the collision with its native namespace fragments. Limit the existing fragment check to these two known entries and validate both operation IDs, tags and response references. No Ledger server or FCTL command change.

/api/ledger/_info#ledger   -> Ledger.V1.GetInfo -> data envelope
/api/ledger/_info#ledgerV3 -> Ledger.V3.Info    -> build metadata
HTTP request for both: GET /api/ledger/_info

Evidence

  • Before: FCTL commands restored to their original logic (328 Go files checked; SDK imports only) fail to compile because Ledger.V1.GetInfo is missing.
  • After: local composition and SDK generation restore both methods. go test -race ./cmd/ledger/... ./pkg/clientcontract passes. Transport tests confirm neither a fragment nor %23 reaches the HTTP path, and each method retains its response model.
  • The restored generated V1 method called staging Ledger v2.4.17 successfully: HTTP 200, server=ledger, version=v2.4.17. V3 was tested with its response fixture; no live V3 qualification is claimed.
  • New validate-openapi assertions reject the previous composed artifact without V1 and pass the corrected one.
  • Local just pre-commit passed with publication disabled and the repository's pinned Speakeasy 1.759.2. The original workflow and workflow lock were restored afterward. Consumer generation used Speakeasy 1.757.1 / generator 2.866.2.
  • git diff --check passed.

Related: FCTL #204. Ledger query-schema decoding is a separate issue.

Merge Danger

Door: two-way

Blast Radius: SDK composition

HTTP routes and response contracts are unchanged. Composed path keys now distinguish V1 and V3 with namespace fragments; generated Go V3 method/signature/route remain intact and V1 is restored. Other OpenAPI consumers must support that representation. Speakeasy documents fragment paths for conflicting operations, with portability limitations outside its tooling.

This qualifies the Ledger info methods, not a full Stack SDK compatibility matrix. Wallets and Reconciliation import-only compile differences remain outside this PR. No merge, release, registry publication or deployment.

@NumaryBot NumaryBot added risk: medium NumaryBot classified this pull request as medium risk. bot-reviewed NumaryBot completed its review workflow for the current head. draft-reviewed NumaryBot reviewed this draft, but published no readiness signal. labels Nov 5, 2026
@Dav-14
Dav-14 marked this pull request as ready for review November 5, 2026 13:14
@NumaryBot NumaryBot added review-approved The NumaryBot review gate is satisfied for the current head. and removed draft-reviewed NumaryBot reviewed this draft, but published no readiness signal. labels Nov 5, 2026

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The required automated review completed with no remaining findings.

@Dav-14
Dav-14 merged commit 181c612 into main Nov 5, 2026
3 checks passed
@Dav-14
Dav-14 deleted the codex/preserve-ledger-v1-info branch November 5, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-reviewed NumaryBot completed its review workflow for the current head. review-approved The NumaryBot review gate is satisfied for the current head. risk: medium NumaryBot classified this pull request as medium risk.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants