Build a writer file path and truncate overly long basenames with a hash suffix.
The resulting file basename retains suffix and appends -<hash> before the suffix when truncation is needed.
-<hash>
str
prefix (str)
suffix (str)
warning_context (str | None)
safe_writer_file_path()