feat(utp): port utopia naming, description, and image-host rules to the site profile - #303
Open
maksii wants to merge 1 commit into
Open
feat(utp): port utopia naming, description, and image-host rules to the site profile#303maksii wants to merge 1 commit into
maksii wants to merge 1 commit into
Conversation
…he site profile main's sites/utp carried taxonomy only, so UTP uploaded with the shared Unit3D release name, the shared description, and no site policy. UTP prescribes its own space-delimited naming (utp.to/pages/33) and hosts its own image host, so every upload needed manual correction. name.go builds UTP's space-delimited name behind SiteProfile.BuildName with BuildNameVersion "v1"; token order is byte-identical to the previous catalog implementation. An unsupported category falls back to the generic dotted base name, which mandatory Unit3D constructibility blocks before upload regardless. description.go renders the shared Unit3D description with each screenshot's full-size original as the link target and the medium thumbnail as the displayed image, which is what UTP expects. Images without a medium thumbnail are left unchanged and the input slice is never mutated. rules.go declares SkipModifiedReleaseCheck, a new declarative RuleSet opt-out: because UTP prescribes space-delimited naming, a renamed source is expected there rather than a rename violation, so neither the heuristic nor the srrdb signal may block. AudioPolicy allows Ukrainian and English as additional audio languages, since UTP releases always carry Ukrainian plus the original audio. UTPPM becomes a UTP-owned conditional image host rather than a generic selectable one, matching the reelflix conversion precedent: a new UTPPMEnabled toggle gates it, and existing configs that placed utppm in a generic slot lose that selection. The utppm uploader now rejects a response carrying no image URL instead of returning an empty upload result, with the remote message sanitized. taxonomy.go lowercases the resolution key before mapping, so a differently cased prepared resolution no longer falls through to the unknown fallback ID.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sites/utponmaincarried taxonomy only, so UTP uploaded with the shared Unit3D release name, theshared description, and no site policy. UTP prescribes its own space-delimited naming
(utp.to/pages/33) and hosts its own image host, so every upload needed
manual correction.
Naming
name.gobuilds UTP's space-delimited name behindSiteProfile.BuildNamewithBuildNameVersion"v1". Token order is byte-identical to the previous catalog implementation. An unsupported categoryfalls back to the generic dotted base name, which mandatory Unit3D constructibility blocks before
upload regardless.
Description
description.gorenders the shared Unit3D description with each screenshot's full-size original asthe
[url]link target and the medium thumbnail as the displayed[img], which is what UTP expects.Images without a medium thumbnail are left unchanged and the input slice is never mutated.
Rules and audio
rules.godeclaresSkipModifiedReleaseCheck, a new declarativeRuleSetopt-out: because UTPprescribes space-delimited naming, a renamed source is expected there rather than a rename violation,
so neither the heuristic nor the srrdb signal may block.
AudioPolicyallows Ukrainian and English asadditional audio languages, since UTP releases always carry Ukrainian plus the original audio.
UTPPM image host
UTPPM becomes a UTP-owned conditional host rather than a generic selectable one, matching the reelflix
conversion precedent: a new
UTPPMEnabledtoggle gates it, and existing configs that placedutppmina generic slot lose that selection.
UTPPMAPIalready existed and is already covered by config secretencryption. The utppm uploader now rejects a response carrying no image URL instead of returning an
empty upload result, with the remote message sanitized.
taxonomy.golowercases the resolution key before mapping, so a differently cased prepared resolutionno longer falls through to the unknown fallback ID.
Tests
name_test.gocovers name construction, type inference when the type field is empty, the titlepreference chain, suppression overrides, and the unsupported-category fallback.
taxonomy_test.gocovers every type and resolution mapping.
description_test.gocovers the URL swap including theno-thumbnail passthrough and input immutability.
rules_test.goproves the skip opt-out for bothrename signals, that a non-exempt tracker still fails, and that the gate also suppresses the
rule-match debug log.
registry_test.gocovers the rules, audio policy, and conditional-host wiring.useSettingsState.test.tscovers the UTPPM settings conversion both ways.go build ./..., the full no-racego test ./...,make lint(architecture/path/literal policy +workflow-contracts-check + golangci-lint, 0 issues),
make logpolicy,make gofix-check-changed,make backend,git diff --check, and the full frontend check set (lint,lint:dead,typecheck,test:unit— 194 pass,format:check) all pass.-raceis not runnable locally (no C compiler); CIsupplies that pass.
The embedded WebUI was exercised by running the built server and loading it in a browser: the UTPPM
toggle and its API-key field render under Settings → Image Hosting, and
utppmno longer appears inthe generic host-priority dropdown.
make e2e-webreports 12 passed / 1 failed; the failure isweb-full-upload.spec.ts:275(Client injection: completed), which reproduces on unmodifiedmainand is unrelated to this change.