Skip to content

fix(types): narrow admission ticket session keys with a type guard - #120441

Merged
steipete merged 1 commit into
mainfrom
fix/admission-ticket-types
Aug 8, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/admission-ticket-types

Conversation

@steipete

@steipete steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

main is red on the tsgo typecheck lane: four TS2345 errors in src/auto-reply/reply/reply-admission-ticket.ts (25, 28, 53×2), introduced by the steer-FIFO landing (#120420). .filter(Boolean) does not narrow string | undefined, so the keys array kept its optional element type.

Why This Change Was Made

Replace the Boolean filter with a typed predicate ((key): key is string => typeof key === "string") — semantics identical (normalizeOptionalString never returns empty strings), type now provably string[]. No behavior change.

User Impact

Unbreaks the typecheck lane for every PR gate diffing against main.

Evidence

  • pnpm tsgo:core: passes (was 4 errors).
  • Steer FIFO suites re-run green: attempt.queue-message + gateway-steer-fifo e2e (2 shards, incl. the 3 process-level ordering proofs).
  • Root cause of the gap: the steer PR's proof ran Vitest/deadcode but not tsgo; the coordinator pipeline now adds a typecheck step to every worker gate.

@steipete
steipete marked this pull request as ready for review August 8, 2026 02:57
@steipete
steipete merged commit df038b9 into main Aug 8, 2026
59 of 61 checks passed
@steipete
steipete deleted the fix/admission-ticket-types branch August 8, 2026 02:57
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 8, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant