Fix auth profile block expiry type narrowing#88409
Conversation
|
Thanks for the context here. I did a careful shell check against current Current main already fixes the type-narrowing failure by making the shared future-timestamp guard a So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the shared predicate fix on main and close this redundant branch rather than merge a second caller-local narrowing path. Do we have a high-confidence way to reproduce the issue? No; the original declaration-build failure is no longer reproducible from current source inspection because Is this the best way to solve the issue? Yes; current main is the better solution because it fixes the shared helper's type contract once instead of duplicating equivalent narrowing in two callers. Security review: Security review cleared: The one-file TypeScript narrowing change does not alter secrets, auth tokens, dependencies, CI, or package resolution. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 471164afbd88; fix evidence: commit 99ce71ddbbdb, main fix timestamp 2026-05-30T19:48:52+01:00. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Math.max.main.Root Cause
Commit
30e3ca08a5replaced the explicit numeric guard forpreviousStats?.blockedUntilwithisFutureDateTimestampMs(...). That helper returnsboolean, not a TypeScript type predicate, soexistingBlockedUntilremainsnumber | undefinedwhen passed toMath.maxduringtsconfig.plugin-sdk.dts.jsondeclaration generation.Before behavior proof:
pnpm buildfailed inbuild:plugin-sdk:dtswithTS2345atsrc/agents/auth-profiles/usage.ts:844and:891, both reportingnumber | undefinedwas not assignable tonumber.Real behavior proof
Behavior addressed:
pnpm buildfailure inbuild:plugin-sdk:dtson currentmain.Real environment tested: local OpenClaw checkout in a detached worktree based on
origin/mainatbdb0fde0ea.Exact steps or command run after this patch:
pnpm buildEvidence after fix:
build:plugin-sdk:dts done in 3.96s; final build summary reportedphase timings: total 101.3swith exit code 0.Observed result after fix: the exact failed build phase completed successfully and the full core/UI build finished.
What was not tested: daemon install, health check, and security audit; those are covered by the follow-up
oc-updaterun.Verification
pnpm buildWhat was not tested
openclaw daemon install --force,openclaw health, andopenclaw security audit --deepbefore opening this PR.