feat: establish versioned UI translation ledger foundation - #929
feat: establish versioned UI translation ledger foundation#929seonghobae wants to merge 187 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough8개 로케일 번역 원장과 읽기 경로를 추가했습니다. 인증된 HTTP 조회, 캐시 검증과 폴백, 게시 후 변경 차단, TRUNCATE 가드, 롤백 경로, 기준선 문서와 검증 테스트도 갱신했습니다. ChangesUI 번역 원장
Estimated code review effort: 5 (Critical) | ~120 minutes Merge Risk: 🔵 Low · up to This change adds a versioned translation ledger and authenticated read API. Runtime behavior is covered by the supplied contract evidence, but release-status documentation checks can still miss contradictory status text and should be tightened before relying on them for readiness claims. Sequence Diagram(s)sequenceDiagram
participant AuthenticatedClient
participant FastAPI
participant translation_ledger
participant PostgreSQL
participant Valkey
AuthenticatedClient->>FastAPI: GET /api/translations/{screen_key}
FastAPI->>translation_ledger: read_ui_translations(...)
translation_ledger->>Valkey: exact-version cache candidate
Valkey-->>translation_ledger: cache payload or miss
translation_ledger->>PostgreSQL: validate digest / fetch projection
PostgreSQL-->>translation_ledger: TranslationScreen
translation_ledger-->>FastAPI: immutable translations
FastAPI-->>AuthenticatedClient: 200 / 404 / 409 / 422
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
left a comment
There was a problem hiding this comment.
Valid finding: the explicit-version Valkey fast path can make a structurally valid but incomplete cache payload authoritative. _decode_cached_screen() validates identity and nonblank values, but it has no independent knowledge of the published resource's required key set. A payload for the exact product/screen/version/locale containing only title therefore bypasses PostgreSQL and returns an incomplete screen, contradicting this PR's fail-closed completeness contract and its statement that PostgreSQL remains authoritative. Add a realistic RED for a correct-identity/partial-key cache payload, then make cache acceptance depend on authoritative published key-set evidence (without cross-locale fallback).
|
Review finding on current head |
|
Review finding on |
seonghobae
left a comment
There was a problem hiding this comment.
Application/DB identity semantics are not actually aligned yet. ADR 0362 says leading/trailing-whitespace product_key and screen_key forms are rejected consistently at PostgreSQL and the application boundary, and migration 0246 rejects them with btrim equality. _validate_identity_segment() instead strips caller input and accepts it, so lineageweave aliases lineageweave before DB/cache lookup. That silently normalizes an ambiguous external identity while the persisted aggregate forbids that spelling. Add a RED covering padded product/screen inputs failing before I/O, then make the application boundary reject rather than normalize.
Scope / owner boundary
PostgreSQL-authoritative versioned UI translation ledger for #922 plus the first authenticated translation API slice. LineageWeave owns product UI copy/presentation read-model behavior only; ontology/concept labels and semantic truth remain with canonical owners. Product contract:
ko/en/ja/zh/vi/es/de/fr, exact screen-key completeness, immutable published versions, no cross-locale fallback, product/screen/version/locale cache identity.Current product lineage
Ledger rollback/publication/TRUNCATE, immutable projection, cache-integrity, typed validation, optional-cache timeout, independent real-wire recursion evidence, and exact-version cache query-budget repairs remain adopted. The valid-hit path uses PostgreSQL digest/key-set admission without transferring the full localized projection; true cache misses use one complete authoritative PostgreSQL projection after bounded Valkey I/O. Synthetic
RecursionErrorinjection remains supplemental only.Current exact head is
2a8ed5d02f4a3082b346d923d754c1ff37ebff52. Its latest intervening delta is test-quality cleanup only: direct dependency-override callables, narrowerExceptioncapture, awaited task-result consumption, and documented best-effort teardown. No ledger/API/DB semantic authority changed.Protected
mainremains83eba56149eb802cd63642c507c324c9976ec78e; this branch contains that line and stays open/Ready/mechanically mergeable. Ready is validation admission only.Exact-head verification
33943899031: success33943898948: success33943898956: success33943899021: success101308656500: success101321891041: success33943898985: failure only at central Dependency Review support preflight101279669944; exact checkout succeeded and OSV/Trivy/Scorecard succeeded, but they are not substitutes33943899007: failure after successful exact-head shard dispatch with no authenticated terminalcodeql-dispatch/<language>verdictopencode-reviewcheck101333611414: failure after successfully validating live PR/head, obtaining GitHub OIDC and a repository-scoped OpenCode App token, and POSTing the canonicalopencode-reviewrepository dispatch; the leaf check then found no current-headAPPROVED/CHANGES_REQUESTEDreceipt and failed closed as designedThe previous body’s
coverage-source-tree queuedstatement is obsolete; it is now terminal GREEN. The remaining model-backed failures are not LineageWeave-local provider implementations. Canonical owner evidence identifies the shared dispatch authorization defect: trusted OpenCode dispatches useopencode-agent[bot], while the organization variable still admits onlygithub-actions[bot]..github#1932already merged uniform comma-separated allowlist parsing;.github#1927remains open for the owner/admin variable update togithub-actions[bot],opencode-agent[bot]..github#1902remains Draft for evidence-driven redispatch after pre-runner/failed earlier attempts. Do not churn this leaf head, substitute a local provider, or synthesize review/status receipts.The repeated Dependency Review HTTP-403/support incident remains owned by
ContextualWisdomLab/.github#810; no local scanner replaces that required gate.Remaining #922 buyer work
This ledger/API is foundation, not completion of the material UI. After normal landing, a real material screen must consume a published eight-locale resource with reviewed product copy. Acceptance still requires normal/loading/empty/error/permission/responsive states, keyboard/focus/screen-reader behavior, CJK/text expansion/font fallback, and fresh desktop/mobile browser evidence on one exact head. PRD/TRD/ARCHITECTURE/UX/OPERABILITY/TEST_STRATEGY/CHANGELOG and
docs/product-technical-gap-baseline.mdmust converge with that cutover.Direct descendant #932 remains Draft on this exact parent, but its secondary-auth RED is no longer pending. Isolated run
33999658012completed GREEN and the verified clean tree was promoted non-force as #932 product head846ec4700666188a281940b99ac4edf776e904ca. That child clears Customer Master secondary projections on token transition and rejects stale async completions by captured-token identity. #932 still lacks fresh full required exact-product-head/browser/a11y evidence and independent approval; none of its GREEN or product evidence transfers to this parent.Do not self-approve, force-push, bypass product gates, weaken evidence, or transfer predecessor/child check or review results.