HISTSIZE is interactive-only, so .zshenv is wrong — it runs for every shell, scripts included. It belongs in .zshrc; several files can set the value you see.
grep HISTSIZE ~/.zshrc
grep HISTSIZE ~/.oh-my-zsh/lib/history.zsh
grep HISTSIZE /etc/zsh*
Oh My Zsh keeps history settings in ~/.oh-my-zsh/lib/history.zsh, defaults above the 1000 that usually prompts the question; system-wide values come from /etc/zshrc, /etc/zprofile or /etc/zshenv.
Value and origin:
echo $HISTSIZE
echo $SAVEHIST
zsh -xv # every file sourced, in order
Change it in .zshrc, then source ~/.zshrc:
HISTSIZE=10000
SAVEHIST=10000
compinstall filename style
zstyle ':compinstall' filename '~/.zshrc'
The interactive text setup for zsh completion: tells compinstall where to write results; without it compinstall asks each time, with it fixed and dotfiles-friendly.
It does nothing alone — only if compinstall is run, and writes completion configuration only: autoload -Uz compinit, compinit, completion zstyle rules and related options. History, aliases, keybindings and PATH are untouched.
Keep completion configuration out of .zshrc: point the style elsewhere and source the result:
zstyle ':compinstall' filename '~/.zshrc.compinstall'
[[ -f ~/.zshrc.compinstall ]] && source ~/.zshrc.compinstall
zstyle -L ':compinstall' # where the setup would be written