Skip to content

feat: add {content_hash} naming placeholder (AI生成) - #109

Merged
pluveto merged 3 commits into
mainfrom
feat/issue-71-content-hash
Sep 1, 2026
Merged

pluveto merged 3 commits into
mainfrom
feat/issue-71-content-hash

Conversation

@pluveto

@pluveto pluveto commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Closes #71.
Supersedes #106 (rebase onto main after #104/#105/#107/#108).

{fname_hash} and {content_hash} are xxHash32 (seed 0). Callers pass an explicit content_hash fallback; empty bytes are never hashed.

{fname_hash} is MD5 of the stem, so same-name files overwrite each other.
Artifact now answers a content digest; KeyPolicy interpolates
{content_hash}, {content_hash4}, and {content_hash8} (MD5 hex lowercase).
Templates that need a digest fail when the artifact has no readable bytes.
{fname_hash} and {content_hash} are xxHash32 (seed 0). Artifact answers
bytes only; KeyPolicy hashes. Callers pass content_hash_fallback so
missing or empty content is never hashed.
resolve_content_hash is a KeyPolicy method. HMAC hex encoding lives on
HmacSpec. No file-level helper functions remain.
@pluveto
pluveto force-pushed the feat/issue-71-content-hash branch from fcbd360 to 0aa18ef Compare September 1, 2026 15:04
@pluveto
pluveto merged commit a43744d into main Sep 1, 2026
3 checks passed
@pluveto
pluveto deleted the feat/issue-71-content-hash branch September 1, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

文件名格式模板 增加 文件自身hash值

1 participant