render: add glyph payload resource proof diagnostics#1159
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds “P20” diagnostics and identity tooling for advanced glyph payloads and native Skia glyph-run replay, including version bumps to reflect the expanded IR/resource semantics.
Changes:
- Introduces native Skia glyph-run “replay proof” diagnostics with reason codes and adds targeted tests.
- Adds stable
payloadResourceKeygeneration/serialization for advancedGlyphOutlinepayloads (Rust + Studio TypeScript) to prevent cache/resource-id collisions across payload families/palettes. - Extends
ResourceArenawithBinaryResourceRef-based font-blob byte resolution and bumps schema/resource table minor versions.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/skia/renderer.rs | Adds replay-proof reasoning for native Skia glyph-run replay eligibility and tests. |
| src/paint/schema.rs | Bumps schema/resource table minor versions for the updated export surface. |
| src/paint/resources.rs | Adds lookup of font blob bytes by BinaryResourceRef and tests. |
| src/paint/paint_op.rs | Adds payload resource key generation for glyph outline sidecars. |
| src/paint/json.rs | Exports payloadResourceKey and advertises the feature in metadata; updates tests. |
| rhwp-studio/tests/render-backend.test.ts | Adds Studio test coverage for payload resource key disjointness. |
| rhwp-studio/src/view/glyph-outline-payload-status.ts | Adds Studio-side payload resource key computation. |
| rhwp-studio/src/core/types.ts | Extends Studio types to include payloadResourceKey and palette ref fields. |
| docs/text-ir-v2.md | Documents P20 behavior for payload identity keys and replay-proof blockers. |
| README.md | Adds P20 changelog entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
리뷰를 마치고 머지했습니다 (devel 리뷰 요약핵심 변경
확인한 점
검증 (로컬 머지 시뮬레이션 + 머지 후 재검증)
|
What
GlyphOutlinepayload에payloadResourceKey를 추가해서 color layer / bitmap glyph / SVG glyph sidecar의 replay/cache identity를 분리합니다.imageRef와 SVGsvgRef처럼 같은 숫자 ref를 쓰는 payload가 서로 같은 cache entry로 보이지 않도록 Rust JSON과 Studio helper 양쪽에 같은 key contract를 둡니다.ResourceArena에서 versionedFontBlobref로 실제 blob bytes를 확인하는 proof helper를 추가합니다.1.15, resource table schema를1.4로 올리고, 관련 문서와 테스트를 갱신합니다.Why
P19에서 color layer / bitmap glyph / sanitized SVG glyph payload vocabulary와 COLRv1 일부 CanvasKit replay gate를 열었습니다. P20은 그 다음 단계로 실제 replay를 더 열기 전에 resource identity와 native font construction 실패 이유를 명시하는 작업입니다.
특히 payload family가 다른데 numeric ref만 같아서 cache key가 충돌하는 상황, font blob ref는 있지만 bytes가 없는 상황, TTC/OTC face index나 variation axis 때문에 native Skia exact typeface construction이 막히는 상황을 조용히 통과시키지 않도록 합니다.
Review follow-up
payloadResourceKey는 strict payload contract를 만족할 때만 내보냅니다. incomplete payload는 key를 만들지 않아-placeholder 기반 충돌을 피합니다.replayEligibilityNotPortable과fontBlobNotPortable을 분리하고, reason list는 전역 정렬로 안정화했습니다.PageLayerTreereplay iterator를 검토하는 쪽입니다.Compatibility
TextRunfallback을 유지합니다.Non-goals
GlyphRun/GlyphOutlinedirect replay를 켜지 않습니다.Validation
cargo fmt --checkcargo test --libcargo test --features native-skia skia --libcargo test --features native-skia --lib native_skia_glyph_run_proof --no-default-featuresnpm --prefix rhwp-studio test -- render-backendnpm --prefix rhwp-studio run buildgit diff --checkRefs #536