관리 daemon의 실행 commit SHA를 NPC 감사 결정에 기록

This commit is contained in:
2026-09-16 08:29:55 +00:00
parent b470e32e81
commit eb680121c3
14 changed files with 104 additions and 11 deletions
@@ -32,3 +32,9 @@ export interface PendingAuditDecision {
export const auditDecisionIdentity = (serverId: string, generalId: number, tick: number, revision: number) =>
auditPolicyHash([serverId, generalId, tick, revision]);
// 확정된 전체 SHA만 받는다. branch/tag/축약 SHA나 미상 값을 현재 checkout에서 추정하지 않는다.
export const normalizeAuditCodeVersion = (value: string | undefined): string | undefined => {
const sha = value?.trim().toLowerCase();
return sha && /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/.test(sha) && !/^0+$/.test(sha) ? sha : undefined;
};