Skip to content

[Hackathon] fix(cli): warn when --ttl is outside the effective 60–28800 range instead of silently relying on server clamping #408

Closed as not planned

Description

@892041548

Verified against (commit SHA or released version)

commit 988c035 — @testsprite/testsprite-cli 0.14.0

Discord Username / User ID

zzzzzy

What does this improvement do?

tunnel start --ttl documents an effective range of 60–28800 seconds ("The server clamps this"), but the CLI passes any positive integer through with no feedback. A user passing --ttl 5 gets a 60-second tunnel with no indication their request was changed.

Details / implementation notes

Reproduction (built from source at 988c035, v0.14.0):

$ testsprite tunnel start --ttl 5 --dry-run
[dry-run] sample response — not from the server
POST /api/cli/v1/tunnel
...

no warning; the server will clamp 5 → 60 silently

Expected: a stderr warning when the value is outside 60–28800, so the user knows the effective lifetime differs from what they asked for.
Actual: no warning; the value is sent as-is and clamped server-side.
Suggested fix: warn in parseTtl (src/commands/tunnel.ts) when out of range, still proceeding — the server accepts the value, so this stays a warning, not a hard error.

Confirmations

  • I have searched existing issues and this is not a duplicate.
  • I have provided my Discord identity above for reward coordination.

Activity

  1. added
    needs-triage
    hackathon
    on Oct 16, 2026
  2. 892041548 commented on Oct 16, 2026

    @892041548
    Author

    /assign

  3. testsprite-hob commented on Oct 16, 2026

    @testsprite-hob

    Thanks for the interest, @892041548! This issue hasn't been accepted for implementation yet — see the triage comment (a maintainer will label it accepted once it is). Feel free to check back, or ping us on Discord if it's been quiet.

  4. fyZhang66 commented on Oct 22, 2026

    @fyZhang66
    Contributor

    Thanks @892041548. The help text documents the 60–28800 range and the server clamp, and tunnel start prints the effective expiry right after minting, so the lifetime isn't hidden. Closing as not planned.

  5. removed
    needs-triage
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    hackathon

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions