Merge pull request 'auto: PR for feat/verify-integrity-cli' (#70) from feat/verify-integrity-cli into main
CI / test (push) Successful in 54s

This commit was merged in pull request #70.
This commit is contained in:
2025-11-16 11:59:58 +00:00
2 changed files with 38 additions and 10 deletions
+19 -4
View File
@@ -43,16 +43,31 @@ jobs:
if-no-files-found: ignore if-no-files-found: ignore
retention-days: 3 retention-days: 3
- name: Ensure artifacts export folder
run: |
set -euo pipefail
mkdir -p ./artifacts/export
- name: Verify bundle integrity (optional) - name: Verify bundle integrity (optional)
run: | run: |
set -euo pipefail set -euo pipefail
if [ -d ./artifacts/export ]; then if [ -f ./artifacts/export/assets.integrity.index.json ]; then
echo "Found ./artifacts/export; generating verify inputs" echo "Found integrity index; generating verify inputs"
npm run verify:make-json npm run verify:make-json
echo "Running verify CLI" echo "Running verify CLI"
npm run verify:run npm run verify:run | tee /tmp/verify_output.json
echo "--- verify summary (for quick view) ---"
node -e '
const fs = require("fs");
try {
const txt = fs.readFileSync("/tmp/verify_output.json", "utf-8");
const obj = JSON.parse(txt);
const s = obj.summary || {};
console.log(`ok=${obj.ok} total=${s.total||0} missing=${s.missing||0} integMismatch=${s.integrityMismatches||0} sizeMismatch=${s.sizeMismatches||0} bundleHashMismatch=${s.bundleHashMismatch||false}`);
} catch (e) { console.log("(verify summary parse skipped)"); }
'
else else
echo "No ./artifacts/export; skipping integrity verification" echo "No integrity index at ./artifacts/export/assets.integrity.index.json; skipping integrity verification"
fi fi
- name: Auto-merge PR on green - name: Auto-merge PR on green
+19 -6
View File
@@ -361,7 +361,7 @@
- [ci] auto pipeline 최종 재검증 최종 ping (2025-11-14 22:26:59) - [ci] auto pipeline 최종 재검증 최종 ping (2025-11-14 22:26:59)
## Export ZIP 무결성 강화(Option2) 진행 현황 ### Export ZIP 무결성 강화(Option2) 진행 현황
### 목표 ### 목표
- Export ZIP 무결성 강화: 자산 무결성 지표와 번들 검증 체계 구축 - Export ZIP 무결성 강화: 자산 무결성 지표와 번들 검증 체계 구축
@@ -382,6 +382,14 @@
- Export Options(폰트 프리커넥트/프리로드, 이미지 로딩/디코딩, robots 메타) UI/문서화 - Export Options(폰트 프리커넥트/프리로드, 이미지 로딩/디코딩, robots 메타) UI/문서화
- 브랜치 푸쉬 완료: `feat/export-bundle-integrity` - 브랜치 푸쉬 완료: `feat/export-bundle-integrity`
- 이미지 최적화 옵션(1차): `fetchpriority`/`srcset`/`sizes` 추가 및 테스트 그린 - 이미지 최적화 옵션(1차): `fetchpriority`/`srcset`/`sizes` 추가 및 테스트 그린
- 이미지 최적화 옵션(2차): `imageAutoSizes`(srcset만 있을 때 기본 sizes 자동 적용)
- 이미지 최적화 옵션(3차): `imageSizesPreset`(mobile-first/desktop-fixed) + 우선순위(imageSizes > preset > auto > none)
- 브랜치/PR: `feat/image-optimization` 푸쉬 완료
- verifyIntegrity CLI 래퍼(TDD) 추가: `lib/exporter/verify.cli.ts` + 테스트
- 폴더 기반 직렬화 유틸(TDD) 추가: `lib/exporter/verify.serialize.ts` + 테스트
- CI 통합(권장 플로우): `.gitea/workflows/ci.yml``./artifacts/export` 존재 시 검증 스텝 자동 실행
- 스크립트: `scripts/make-verify-json.js`, `scripts/verify.js` + `npm run verify:make-json`/`verify:run`
- 브랜치/PR: `feat/verify-integrity-cli` 푸쉬 완료
### 하드닝 ### 하드닝
- ZIP 경로 가드: `../`, 절대경로(`/`), 역슬래시(`\`) 차단 (테스트 포함) - ZIP 경로 가드: `../`, 절대경로(`/`), 역슬래시(`\`) 차단 (테스트 포함)
@@ -397,11 +405,16 @@
- Node/브라우저 호환 btoa/atob 제거, 안전한 변환 로직 적용 - Node/브라우저 호환 btoa/atob 제거, 안전한 변환 로직 적용
### 다음 작업 ### 다음 작업
1) PR 생성(템플릿/라벨): `feat/export-bundle-integrity``main` 1) PR 생성/머지 순서 관리: `feat/image-optimization`, `feat/verify-integrity-cli` → main
2) CI 무결성 검증 스텝 추가: `verifyIntegrity`로 빌드 산출물 검사(요약 리포트 로깅) 2) CI 검증 리포트 형식 보강: 요약 필드(total/missing/...)를 워크플로 로그에 하이라이트
3) PR 라벨 자동화 및 조건부 머지(Gitea Actions/웹훅) 3) PR 라벨 자동화 및 조건부 머지(Gitea Actions/웹훅) 유지
4) README에 사용 가이드 보완(verifyIntegrity 활용 예시) 4) 변환 파이프라인(AVIF/WebP) 설계 초안(TDD 스텁)
5) 이미지 최적화 2차: `sizes` 기본 정책 프리셋 및 변환 파이프라인(AVIF/WebP) 설계 초안(TDD 스텁) 5) README/개발자 가이드에 `./artifacts/export` 폴더 정책 명시(로컬/CI 공통)
### 산출물 경로 정책(CI)
- 기본 폴더: `./artifacts/export/` (ZIP 해제 또는 직접 생성)
- 검증 입력: `npm run verify:make-json``./artifacts/extras.json`/`./artifacts/assets.json`
- 검증 실행: `npm run verify:run` (종료코드 0/1/2)
### CI/CD 계획(초안) ### CI/CD 계획(초안)
- PR 오픈 시: 라벨 자동 지정, 테스트/빌드, 무결성 검증 스텝 실행 - PR 오픈 시: 라벨 자동 지정, 테스트/빌드, 무결성 검증 스텝 실행