Skip to content

feat(listReservations): lock in expires_*/finalized_* window passthrough (0.3.3)#104

Merged
amavashev merged 1 commit into
mainfrom
feat/list-reservations-expires-finalized-filters
May 22, 2026
Merged

feat(listReservations): lock in expires_*/finalized_* window passthrough (0.3.3)#104
amavashev merged 1 commit into
mainfrom
feat/list-reservations-expires-finalized-filters

Conversation

@amavashev
Copy link
Copy Markdown
Contributor

Summary

Client-side companion to cycles-protocol-v0.yaml revision 2026-05-22 and cycles-server#163. Closes the TypeScript-client side of runcycles/cycles-server#162. Follow-up to v0.3.2 with the same shape, just four more params.

What this PR does

  • Adds a regression test for listReservations confirming expires_from/expires_to/finalized_from/finalized_to ISO-8601 values are URL-encoded and forwarded to the query string. The existing params?: Record<string, string> signature already accepts them — the test pins the contract.
  • Bumps to 0.3.3.
  • Updates AUDIT.md and CHANGELOG.md.

No production code change.

Call-site

await client.listReservations({
  tenant: "acme",
  expires_from: "2026-05-22T00:00:00Z",
  expires_to: "2026-05-23T00:00:00Z",
  finalized_from: "2026-05-15T00:00:00Z",
  finalized_to: "2026-05-22T00:00:00Z",
});

Verification

  • npm test: 317 passed, 5 skipped.
  • npm run test:coverage: 98.4% statements / 99.62% lines (gate ≥95%).

Test plan

  • CI green
  • (After merge) optional smoke against a v0.1.25.21 cycles-server

Closes the TypeScript-client side of runcycles/cycles-server#162.

…ugh (0.3.3)

Client-side companion to cycles-protocol-v0.yaml revision 2026-05-22
(runcycles/cycles-protocol#98) and runcycles/cycles-server#163.
Closes the TypeScript-client side of issue #162. Follow-up to v0.3.2
with the same shape, just four more params.

The existing `listReservations(params?: Record<string, string>)`
signature already forwards arbitrary keys to the URL query string,
so the four new ISO 8601 date-time params (expires_from /
expires_to / finalized_from / finalized_to) work over the wire
today without a code change. This commit adds a regression test
that pins the URL-encoded passthrough.

Call-site:

  await client.listReservations({
    tenant: "acme",
    expires_from: "2026-05-22T00:00:00Z",
    expires_to: "2026-05-23T00:00:00Z",
    finalized_from: "2026-05-15T00:00:00Z",
    finalized_to: "2026-05-22T00:00:00Z",
  });

Colons URL-encoded to %3A per native fetch + URLSearchParams.

No protocol or wire-format change; servers older than v0.1.25.21
silently ignore the new params per the additive-parameter guarantee.
317 tests pass at 98.4% statement / 99.62% line coverage.

Bumped to 0.3.3, updated AUDIT.md and CHANGELOG.md.
@amavashev amavashev merged commit 8fe78ed into main May 22, 2026
9 checks passed
@amavashev amavashev deleted the feat/list-reservations-expires-finalized-filters branch May 22, 2026 12:50
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