Skip to content

Fix sync PR UoEMainLibrary#7: restore 3 deleted translations, drop the local-only demo harness - #33

Merged
milanmajchrak merged 2 commits into
sync-pr-2026-07-27from
fix/sync-pr-2026-07-27-i18n-and-demo
Jul 27, 2026
Merged

Fix sync PR UoEMainLibrary#7: restore 3 deleted translations, drop the local-only demo harness#33
milanmajchrak merged 2 commits into
sync-pr-2026-07-27from
fix/sync-pr-2026-07-27-i18n-and-demo

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Two defects found while auditing sync PR UoEMainLibrary#7 against the source branch. Both are in this repo only — the backend sync PR is content-complete.

1. The sync deletes three translations the customer already has

Not missing new work — a regression. All three keys are on datashare-UoEMainLibrary-dspace-8_x today (they arrived with sync PR #6) and the sync PR removes them:

key base branch sync-PR head source branch
form.vocabulary.load-error present gone present
item.page.filesection.checksum present gone present
item.page.doi.pending present gone present

Key counts: base 3585 → sync PR 3596 → source 3599.

Cause. 4b21906ce9 is a cherry-pick of a +3/-3 reword that landed as +6/-6. The source commit sits on uoe/move-keep-embargo-policies, cut 2026-06-30, before those three keys existed; the en.json5 conflict was resolved by taking that branch's file whole, and the resulting blob is byte-identical to the source one (fd7d9912…). Harmless upstream, destructive here.

Impact. All three are referenced by code shipped in this sync PR, and MissingTranslationHelper returns params.key, so the raw key renders:

  • full-file-section.component.html:27 and :70item.page.filesection.checksum shown twice per bitstream on every full item record
  • metadata-uri-values.component.html:18item.page.doi.pending on items awaiting DOI registration
  • dynamic-vocabulary.component.ts:63 → error toast body when a controlled-vocabulary lookup fails

The datashare theme still carries item.page.doi.pending, but it never reaches the browser: angular.json copies only src/assets, src/robots.txt and a favicon, and merge-i18n is a manual script present in no build step, Dockerfile or CI job.

Why CI is green anyway. metadata-uri-values.component.spec.ts registers TranslateLoaderMock, which returns {}. The specs assert on the raw key and pass regardless of en.json5, so no test can catch this class of regression.

2. The sync ships 1.5 MB of local-only demo artifacts

2bc0bd61e5 faithfully carried Dockerfile.karma + demo/** across with the dropdown fix. Upstream removed them again 48 minutes later in 85124a0ce7 ("keep local-only test Dockerfile and demo harness out of the PR") — 17 minutes after the sync PR's last picked commit, so it fell outside the window. It is the only non-merge commit from the sync window that did not make it across.

13 files, 1,574,221 bytes, 98.7% incompressible .webm/.gif/.png. Absent from both the base branch and the source branch. Git history is append-only, so this is the one defect that cannot be cleanly undone after merge.

Merge strategy matters here. This removes the files from the tree, but 2bc0bd61e5 still adds them. Under a squash merge — how every previous sync PR was merged — the resulting commit has no demo blobs and nothing enters the customer's history. Under a plain merge commit or a rebase merge, they land anyway.

Verification

After these two commits the branch tree is byte-identical to the source branch tip:

tree(fix/sync-pr-2026-07-27-i18n-and-demo) = e08b05938b80ea8f24994151fb5189abc0aa19d1
tree(dataquest-dev … datashare-UoEMainLibrary-dspace-8_x) = e08b05938b80ea8f24994151fb5189abc0aa19d1

Git trees are content-addressed, so equal SHAs mean the two trees are identical file-for-file and byte-for-byte. The two-dot diff between this branch and the source is now empty — nothing else changed.

en.json5 was taken whole from the source branch; the two-dot diff on that path was additions-only, so the three keys are restored and nothing else moves.

Not addressed here (worth a look before merging the sync PR)

  • The customer has no bitstream.upload-from-path.* keys today. The sync PR introduces the whole block with enabled = true and allowed-paths = /bigfiles, turning on server-side file reads that did not exist before. Admin-guarded in code, but it needs an ops confirmation that /bigfiles is not writable by non-administrators.
  • The dspace healthcheck CLI command is removed from launcher.xml with no alias; dspace health-report replaces it. Any cron or systemd unit calling the old name will start failing.
  • usage-statistics.cfg uncaps topCountriesLimit/topCitiesLimit (100 → -1), adds topDownloadsLimit = -1, and widens startDateInterval -6 → -60 — noticeably larger Solr facet responses on production traffic.

🤖 Generated with Claude Code

milanmajchrak and others added 2 commits July 27, 2026 08:56
4b21906 resolved the en.json5 conflict by taking the source branch's
whole file. That branch (uoe/move-keep-embargo-policies, cut 2026-06-30)
predates three keys the customer already had from sync PR #6, so the
cherry-pick silently deleted them:

  form.vocabulary.load-error
  item.page.filesection.checksum
  item.page.doi.pending

All three are referenced by code shipped in this PR, and
MissingTranslationHelper renders the raw key, so the UI would show
"item.page.filesection.checksum" twice per bitstream on the full item
record and "item.page.doi.pending" on items awaiting DOI registration.
The datashare theme copy does not help: angular.json never copies
src/themes/*/assets/i18n into the build and merge-i18n is a manual
script, so src/assets/i18n/en.json5 is authoritative at runtime.

Unit tests cannot catch this - TranslateLoaderMock returns {}, so the
specs assert on the raw key and pass either way.

en.json5 is taken whole from the source branch; the two-dot diff on that
path is additions-only, so this restores the three keys and changes
nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cherry-pick of dataquest-dev/uoe-dspace-datashare-angular 85124a0,
authored 17 minutes after the last commit picked into this sync PR and
so left outside the pick window. It is the only non-merge commit from
the sync window that did not make it across.

2bc0bd6 faithfully carried Dockerfile.karma and demo/** over together
with the dropdown fix; upstream then removed them again as local-only
recording evidence. Without this commit the sync ships 13 files /
1,574,221 bytes - 98.7% of it incompressible .webm/.gif/.png - and git
history is append-only, so a later deletion would not reclaim it.

Dockerfile.karma also sits at the repo root with no CMD/ENTRYPOINT and an
unpinned node:20-bookworm base, and demo/package.json is a second,
unmanaged manifest that dependency scanners would pick up.

Note: this keeps the blobs out of the customer's history only under a
squash merge, as every previous sync PR was merged. Under a plain merge
commit or a rebase merge, 2bc0bd6 still introduces them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@milanmajchrak milanmajchrak changed the title Fix sync PR #7: restore 3 deleted translations, drop the local-only demo harness Fix sync PR UoEMainLibrary#7: restore 3 deleted translations, drop the local-only demo harness Jul 27, 2026
@milanmajchrak
milanmajchrak merged commit 3225237 into sync-pr-2026-07-27 Jul 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant