Skip to content

Maintainer decisions needed after the 2026-09-23 hardening round #686

Description

@b3hr4d

Today's hardening round stopped wherever a fix would change public behaviour. Each entry gives the question, the options, the issue's or PR's recommendation if any, and the user-visible impact; the linked issue or PR holds the evidence. Items most likely to affect correctness lead each package. Held PRs #578, #599 and #600 are green and mergeable.

Three entries share one underlying question: may a state-changing update call be re-sent automatically? #622 (query hooks' default retries), #600 (a global mutation retry reaching execute()) and the remaining #564 item (the hook's retry on an update's call()) all follow from that rule, so deciding it first settles all three.

core

#578 (held PR) Should createPollingStrategy time out requests after 5 minutes by default?

#647 Should fetchQuery() and factory .fetch() keep rejecting with TanStack's CancelledError, which is not a documented reactor error, when a sign-in or sign-out interrupts them?

  • Options: (1) refetch under the new identity; (2) rethrow as CallError; (3) document it. The audit recommends 1.
  • Impact: route loaders get the new identity's data instead of an error boundary.

#642 Should a callConfig.agent query stop sharing a cache entry with the default agent's, which serves one principal's answer to another?

  • Options: (1) an agent segment in overridden keys; (2) document a distinguishing queryKey; (3) throw or warn without one. The audit recommends 1.
  • Impact: override queries reach the replica; other keys are unchanged.

#643 On Codespaces and Gitpod, should a ClientManager without host use the page origin, not mainnet, and stop auto-trusting ic_env cookies that strangers' workspaces can set?

  • Options: (1) origin, cookie trusted only with allowEnvConfig: true; (2) origin, trust kept; (3) routing kept, trust dropped. The audit recommends 1.
  • Impact: codespace dev apps reach their own replica; canister IDs from the cookie there need allowEnvConfig: true.

#646 Should reactorRetry stop retrying HTTP 4xx refusals, such as an expired delegation that takes 16 requests and about 20 s to fail?

  • Options: (1) no 4xx retry except 408 and 429; (2) retry 4xx once; (3) document retryTimes: 0. The audit recommends 1.
  • Impact: a lapsed session errors after the agent's own 4 requests; 5xx, 408 and 429 still retry.

#565 items 2–3 How should display values tell an enabled but empty opt vec from none (a form's [] is sent as none), and a _type variant arm from the discriminator (resolving it throws)?

#633 Should DisplayReactor keep vec record { text; T } as an object, which drops repeated keys (a second Set-Cookie) and reorders numeric-looking ones?

  • Options: (1) keep it, document; (2) array of pairs, breaking icrc1_metadata and ICRC-3 shapes; (3) object only when lossless. The audit recommends 1 now, 2 at the next major.
  • Impact: docs only until then.

#632 Should DisplayReactor accept NaN, ±Infinity and -0 on encode, so a float read from a canister can be sent back?

  • Options: (1) accept them; (2) display them as strings, changing the type; (3) docs only. The audit recommends 1 plus docs.
  • Impact: such values round-trip; JSON still turns them into null, now documented.

#593 Should fromZodSchema support async refinements, and should callMethod(), callMethodWithValidation() and validate() wrap a throwing validator alike?

  • Options: opt-in { async: true } or document sync-only; wrap as CallError with cause or document. The audit recommends the opt-in and the wrapping.
  • Impact: async schemas work in validate() and callMethodWithValidation(); code matching a validator's raw error must read cause.

#595 (closed; docs fixed in #596) Should Reactor.fetchQuery stay cache-first, returning invalidated data, or become stale-aware?

  • Options: keep it; accept revalidateIfStale (needs a peer-floor bump from @tanstack/query-core 5.0.0, or an untyped pass-through); adopt TanStack's fetchQuery semantics. No recommendation.

react

#621 Should useAuth() report isAuthenticating: true until the first session restore settles, so the guides' ProtectedRoute stops bouncing signed-in users to /login?

#622 Should query hooks and factories stop retrying update methods by default, since every re-run executes the update again?

  • Options: (1) docs only; (2) no retry for updates unless retry is set, or SysTransient only; (3) a dev warning; (4) reuse the request id. The audit recommends 1 and 2 (SysTransient only).
  • Impact: a lost response becomes an error, not a second execution; focus refetches remain; explicit retry wins.

#600 (held PR, #564 item 1) Should createMutation(...).execute() run through the MutationCache, like useMutation()?

#599 (held PR, #564 item 3) Should useActorMethod await its invalidateQueries refetches before onSuccess and call() resolve, like the other mutation paths?

#564 (remaining item) Should useActorMethod's call() for an update method apply the hook's retry, retryDelay, networkMode and meta, which it silently ignores today?

#679 Should @ic-reactor/react add a react-server export condition so server components can import core classes from it?

candid

#611 Should MetadataReactor emit Candid-typed defaultArgs for func-record callbacks, and should forms accept an empty text?

  • Options: Candid-typed defaults or converting on that path; accepting "" or documenting "Required". The audit recommends Candid-typed defaults and accepting "".
  • Impact: callMethod({ args: defaultArgs }) stops throwing, with bigint defaults; empty-text methods become callable.

#606 (closed; fixed in #618) Should a url field's inputProps.type stay "url" now that its schema accepts paths like /metrics?

  • Options: keep it (a test pins it), so a browser <form> still rejects paths; change it. No recommendation.

#644 How should candid reactors stop each leaving a permanent ClientManager subscription?

  • Options: (1) compute didjsCanisterId on read; (2) add dispose(); (3) one shared adapter per manager. The audit recommends 1.
  • Impact: dynamic reactors stop piling up callbacks that run on every identity change; nothing to adopt.

parser

#631 Should fields and variant tags named like _0_ print under their hash, so they encode by their name's hash, not as id 0?

  • Options: (1) print them hashed in didToJs and didToTs; (2) reject them; (3) leave it to upstream. The audit recommends 1, plus filing 3 upstream.
  • Impact: these interfaces work, but their keys change (_0_ becomes _4735054_); a hand-written .did that spells a Motoko numeric field _0_ breaks.

vite-plugin / codegen

#664 Should the vite plugin re-detect icp state after vite dev starts, so a later deploy needs no restart?

  • Options: (A) re-detect on page loads, cached; (B) only until every canister resolves; (C) stay static, fix the warning. The audit recommends B, with /api following detection.
  • Impact: deploying after starting the dev server works on the next reload; a fresh-network redeploy still needs a restart.

#565 item 1 Should the plugin reject two entries sharing name and outDir, as the CLI does?

  • Options: fail with the CLI's message; leave it. The audit recommends failing, calling it a small, safe change.
  • Impact: that config fails the build instead of producing nondeterministic output with exit 0.

docs / process

#666 item 4 Which icp-cli version should the examples target, now that vite-plugin-demo uses a sync step icp-cli 1.5 removed (current users can't deploy it) while CI pins 1.2.0?

  • Options: stay on 1.2.0 and say so; move examples and CI to 1.5. No recommendation.

#634 Should the @icp-sdk/core quirks (U1–U9) and candid_parser/bindgen issues be reported upstream?

Checklist

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions