You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fifth adamsreview fix batch — addresses 15 of the 20 findings from the
re-review (rev_01KRSME44NB8FEMR749FS5EQZA) that surfaced regressions
introduced by the prior 4 fix batches. Grouped into 5 fix-group sub-agents:
* Group AA — data integrity (F001+F002+F003)
- F001: F008 sweep used wrong column 'archival_unit_id' for
archive_unit_activities (correct: 'unit_id'). DELETE was silently
failing with MySQL 1054, leaving orphan link rows after every
archival_unit soft-delete.
- F002: authorityDestroyAction now also sweeps archive_agent_relations
(Phase 2 link table) clearing rows where the soft-deleted authority
appears as agent_id OR related_id. Previously: ric.json kept emitting
relations to deleted agents.
- F003: removed 'place_id BIGINT UNSIGNED NULL' from
ddlArchiveActivities() — fresh installs no longer create the column
that migrate_0.7.12.sql then has to drop. Schema parity between
fresh-install and upgrade paths restored.
* Group BB — wire \$relations into show views (F004+F005)
- activityShowAction + placeShowAction now fetch
archive_relations via fetchRelationsForEntity() and pass to the
render. The 'Relazioni RiC-CM' panel on the activity/place detail
pages was always empty before; now displays actual relations.
- try/catch around the fetch — DB failure logs but degrades to empty
list rather than 500-ing the page.
* Group CC — 15 missing locale keys (F009)
- validateActivity/validatePlace error strings + F041 regex hints +
F039 date placeholder were wrapped in __() but ABSENT from
en_US/fr_FR/de_DE locale JSONs (commit d426f26 claimed 12 keys
added; actually only 1 made it).
- Added 15 keys per locale (60 lines total) with real translations
in EN/FR/DE. Project i18n BLOCKING rule now satisfied.
* Group DD — view UX fixes (F006+F007+F008+F012)
- F006: attach/detach forms on activities/show.php + places/show.php
now include 'name=_return_to' hidden input so safeReturnTo() redirects
back to the originating detail page instead of the main
/admin/archives index.
- F007: target_id input on attach forms is now a typeahead bound to
/api/archives/entities autocomplete (debounced 200ms, XSS-safe via
textContent, click-to-select, clears on target_type change,
submit-block when no id selected). Pattern mirrors the canonical
archives/show.php.
- F008: detach buttons now use archivesSwalConfirm() SweetAlert2
helper (already defined on the page) instead of native confirm().
Consistent with the entity-delete buttons.
- F012: geonames_id / wikidata_id / tgn_id inputs on places/form.php
now apply conditional border-red-500 + render error message when
F041 validation rejects.
* Group EE — validation cleanups + tests (F010+F011+F015+F016+F017)
- F010: all 4 destroyAction handlers (archival_unit / authority /
activity / place) wrapped in mysqli transactions with nested-
transaction safety via @@autocommit detection. Soft-delete UPDATE
+ Phase 2/3/4 sweep DELETEs now succeed or fail atomically.
- F011: inline comment on archive_unit_activities mirror in
relationAttachAction documenting that predicate direction is
preserved verbatim (canonical RiC-O inverse list deferred to
v0.7.13).
- F015: placeWouldCreateCycle now prepares the SELECT once outside
the while loop instead of re-preparing every iteration (mirrors
activityWouldCreateCycle's pattern).
- F016: dropped 'AND deleted_at IS NULL' from placeWouldCreateCycle's
SELECT — integrity walks must see the full topology (matches F018
fix already applied to activityWouldCreateCycle).
- F017: 5 new unit tests in tests/archives-ric-jsonld.unit.php
covering buildRelationNode + @graph composition (167 → 172).
PHPStan level 5 clean. Unit tests 172/172. Smoke: ric.json 200,
OAI ric-o 200, admin 302→login. With this commit the re-review
cycle resolves the 15 highest-priority follow-ups. The 5 remaining
below_gate findings (F013, F014, F018, F019, F020 — score < 45)
are documented in trace.md for future cleanup.
0 commit comments