Skip to content

chore(release): sync beta back into development - #5398

Closed
WilcoLouwerse wants to merge 112 commits into
developmentfrom
sync/beta-to-development-2.1.35-unstable.20261030171000
Closed

WilcoLouwerse wants to merge 112 commits into
developmentfrom
sync/beta-to-development-2.1.35-unstable.20261030171000

Conversation

@WilcoLouwerse

@WilcoLouwerse WilcoLouwerse commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Carries beta back into development after the 2 November beta release (#5385) and the 2.1.42-beta version bump (#5388). The release workflow opened no sync PR because files conflicted.

What beta adds to development

What beta does NOT add

Beta carries #4774 (object slugs). Development merged its successor #5389 (fix/4037-object-slugs-v2) on 3 November, so every slug file takes development's version; nothing of #4774 survives this merge. The #4715 review fixes to LogService and SaveObjects were already on development too.

Resolved while merging

  • MapperRegistrar keeps development's AppSettingsInterface and beta's WebhookInterceptionCache.
  • Schema keeps both new boolean fields, objectSlugSuffix and fireEventsOnBulkWrites.
  • The seed-metadata test keeps beta's slug fixtures and development's plain-insert counter.

Local: the migration, slug, backfill, mapper, listener, LogService and SaveObjects tests pass (346 tests).

Merge this, do not squash.

Still to carry: #5957 (MariaDB row_number, #4909)

#5957 backports #5879 to beta; it is not merged into beta yet. Once it is, merge beta into this branch again so it carries it. Development already has the fix, so:

  • lib/Migration/Version1Date20260915050000.php, lib/Migration/Version1Date20261106120000.php, lib/Db/ImportPreviewRow.php and tests/Unit/Migration/Version1Date20261106120000Test.php are byte-identical on both sides, so they bring no change and no conflict.
  • lib/Db/ImportPreviewRowMapper.php: both sides sort on source_row. Take development's version, which also has QueryPage and the decision count.
  • New from beta, keep them: tests/Unit/Db/ImportPreviewRowMapperMigratedTest.php, tests/Unit/Migration/ReservedColumnNamesTest.php and tests/Unit/Migration/fixtures/reserved-words-*.txt. On development, run ReservedColumnNamesTest after the merge. Development has migrations beta lacks, and a new column there with a reserved name would surface as a failure.
  • appinfo/info.xml: beta moves <version> to 2.1.42-beta.20261106120000. Keep a version that is higher than development's at merge time; Version1Date20261106120000 is already in development's oc_migrations history either way.

Carries these PRs

These PRs to development are merged in beta and reach development through this PR; they are closed with a pointer here.

🤖 Generated with Claude Code

WilcoLouwerse and others added 30 commits October 22, 2026 13:06
… and schema

Adds the change object-slugs-configurable-and-unique for #4037: proposal,
a delta on the object-lifecycle spec, design and tasks. Covers persisting
objectSlugField/objectSlugSuffix, uniqueness with a collision warning, a
frozen slug, bulk parity, a 409 for an ambiguous slug and an occ backfill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zen once set

objectSlugField and the new objectSlugSuffix now survive schema save and
import. One ObjectSlugHandler decides every slug: a stored slug never
changes, a slug another live object holds is not written (the object is
saved without one and a warning names both objects), objectSlugSuffix
appends a UTC date-time to a colliding slug, and a bulk save follows the
same rules in batch order, with a COALESCE guard in the upsert. A lookup
whose slug matches two objects answers 409 instead of an HTML 500.

Schemas without objectSlugField keep today's behaviour. The slug is no
longer injected into the object data, which ends the @self.relations.slug
entry and the MagicMapper warning on every save; the unused slug helpers
in SaveObject and MetadataHydrationHandler are gone.

Refs #4037

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lugs

Fills the slugs of existing objects of one register and schema from the
schema's objectSlugField, oldest first, with the same uniqueness and
suffix rules as a save. Existing duplicates are listed and left alone.
--reslug recomputes every slug after the slug field was switched (an
object with an empty source keeps its slug); --dry-run prints the plan.
Writes go straight to the slug column, without a version bump, audit
entry or object event, and a second run changes nothing.

Refs #4037

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>


New unit tests for ObjectSlugHandler (candidate, freeze, uniqueness,
suffix, client slug, batch), the backfill service, the schema
configuration keys, the bulk writer's slug column and the 409 on an
ambiguous slug. The tests of the removed slug helpers are dropped or
turned into checks that the slug no longer enters the object data. The
pre-update-state guard now pins the flag's slot and requires anything
appended after it to be optional, which executeUpsertChunk's new
freezeSlug parameter is.

The schema docs describe objectSlugField, objectSlugSuffix and the
backfill; the changelog records the behaviour changes for schemas that
opt in.

Refs #4037

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An update decided the slug twice (handleObjectUpdate and updateObject
  both prepare the entity), logging collisions twice and, for a taken
  @self.slug, letting the second pass fall back to objectSlugField.
  The second prepare now keeps the first decision.
- Bulk saves decided slugs against the rows' advisory @self.register
  while persistChunk writes into the caller's register; the decision
  now uses the table the rows are written to. A managed group whose
  register cannot be resolved gets no slug instead of an unchecked
  client value, and a top-level client slug the fast path strips from
  the business data still reaches the decision.
- decideBatch checks the suffixed variant against the database in the
  same prefetch, with one stamp per batch, and freezes a uuid that
  occurs twice in one batch on its first decision.
- The backfill keeps only the candidate per row instead of every object
  body, orders oldest first by _created then _id as specified, keeps an
  existing suffixed slug on --reslug so a second run changes nothing,
  writes a slug only if the row still holds the planned old value
  (skipped rows are counted and logged), and resolves a schema slug
  among the register's own schemas.

Refs #4037

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tag the public slug methods that had no @SPEC (ObjectSlugHandler
isManaged, withSuffix, isSuffixOf, logCollision; SaveObject
getSlugHandler; BackfillObjectSlugsCommand configure and execute;
ObjectSlugBackfillService run) with the requirement each implements, so
the spec-coverage gate (16) finds them. Every anchor resolves to a
`### Requirement:` heading in the change's object-lifecycle spec.

Closes review findings save-f1, backfill-f1 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the ternaries on lines this PR added as if/else, break the
`$boolFields` list in Schema::sanitizeConfiguration over lines, split an
over-long log message and a comment line in SaveObjects, add the missing
`@param` docs for `$managedSlug` and `$freezeSlug` in MagicBulkHandler,
add the `@spec` tag to the backfill command's class docblock, and drop
the unused `$slugHandler` local in SaveObjects::applyObjectSlugs.
Behaviour is unchanged.

Closes review findings save-f3, bulk-f1, bulk-f5, backfill-f2 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
findSlugBackfillPage() dropped a row whose convertRowToObjectEntity()
returned null, so a full page of 500 came back as 499 and loadRows()
ended its `count($page) === PAGE_SIZE` loop early, silently skipping the
rest of the table. The method now returns the convertible rows together
with how many rows the query returned and the last `_id` scanned; the
loop pages on those, so the keyset cursor moves past a skipped row, and
the skipped row is logged as a warning with its uuid.

The new test feeds a full page with one skipped row followed by a second
page and asserts the second page is still read from the last scanned
`_id` and its rows are assigned; it fails with the old loop condition.

Closes review finding backfill-f3 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t rewrite

Drop the three empty section headers (createSlug (private),
generateSlug (private), generateSlug - empty value returns null) in
SaveObjectTest and collapse the runs of blank lines the deleted
createSlug/generateSlug tests left in SaveObjectTest, SaveObjectDeepTest,
SaveObjectAdditionalTest and BulkAndHandlersIntegrationTest.

Closes review finding save-f8 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A save never changes a set slug, but `occ openregister:backfill-slugs
--reslug` does, and links built on the old slugs stop working. Say so in
the command description and option help, in docs/technical/schemas.md
(both the "frozen once set" bullet and the existing-objects bullet) and
in both CHANGELOG entries, so no copy of the "frozen" promise omits the
exception. The spec delta is not touched.

Closes review finding backfill-f5 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SaveObject::getValueFromPath() lost its only caller with generateSlug(),
and MetadataHydrationHandler::createSlugFromValue() lost its only caller
with the hydrator slug block. Delete both, with the tests that only
exercised them (reflection tests in SaveObjectTest, SaveObjectDeepTest
and SaveObjectAdditionalTest, testCreateSlugFromValue in
BulkAndHandlersIntegrationTest). phpstan no longer reports
method.unused.

Closes review finding save-f2 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The backfill help and docs/technical/schemas.md said existing slugs are
"reported"; they are left alone, only duplicates are reported. They also
did not say that --reslug leaves an object without a slug when its new
slug is already held and objectSlugSuffix is off.

Closes pre-push findings pp-f1, pp-f2 of the #4774 review fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fill run

--reslug no longer clears the slug of an object whose recomputed slug another
object holds: the object keeps its current slug (the suffixed one when
objectSlugSuffix is on) and the plan, the console and the log report it as
kept. Stored slugs stay reserved until their holder moves, so no object is
handed a slug another still carries.

Every backfill run that is not a dry run writes one audit-trail entry with the
old to new list of the objects it changed, and the write runs in transactions
of 500 rows instead of one for the whole table.

Closes review finding backfill-f4, backfill-f6 and the transaction part of
backfill-f8 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add BackfillObjectSlugsCommand tests (schema without objectSlugField,
unresolved register, schema outside the register, id arguments, dry run,
kept and duplicate console lines). The second-run tests in
ObjectSlugBackfillServiceTest, committed with the reslug change, now feed the
plan of run 1 back as the rows of run 2 for the default and the --reslug mode.

Closes review finding backfill-f7 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MagicMapper::restoreObject() now asks ObjectSlugHandler::slugForRestore()
whether another live object took the slug after the delete: the restored
object then comes back without it (with the suffixed slug when
objectSlugSuffix is on) and a warning names both objects. The handler is
resolved through the container the mapper already holds, so the mapper gets
no constructor dependency on it. The configuration seed import sets its slug
through ObjectSlugHandler::applyOnSave() instead of setSlug().

Closes review finding save-f5 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SaveObject-level tests: an update with a changed source field keeps the stored
slug, a client slug and an empty client slug on a frozen object are ignored,
a second prepare of the same save does not decide the slug again, and
updateObject() maps slugDecided onto that prepare. They fail when
originalSlug is replaced by null and when the decideSlug flag is forced to
true.

Closes review finding save-f6 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uuid over a slug

Update, patch, postPatch, destroy, canDelete, lock, unlock, logs, contracts,
uses and used now map MultipleObjectsReturnedException to the same 409
"ambiguous-identifier" body as show(), through one helper, instead of a 500
or a misleading 403.

The identifier lookup keeps its single OR(id, uuid, slug, uri) query but picks
among several matches: the row whose _id or _uuid is the identifier wins, so a
numeric slug no longer makes a lookup of that number ambiguous with the object
that has that id. Several slug matches stay ambiguous.

Closes review finding bulk-f2 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the slug helpers

A client slug is now normalised like a generated one (slugify, cut to 255
characters; one that normalises to nothing counts as not sent) in
ObjectSlugHandler::candidate(), and the bulk check keys the holders it reads
case-folded, so a stored `hello` and a bulk client slug `Hello` collide as
they do in the single path. A save whose register does not resolve now logs
why the slug was dropped.

The bulk decision moves into ObjectSlugBatch (decideRow, frozenSlug), the
warnings into ObjectSlugLog and the backfill write side into
ObjectSlugBackfillWriter, which clears the phpmd complexity, else-branch and
coupling findings on those classes.

Closes review finding bulk-f3, save-f7 and save-f4 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t it builds

The per-column upsert assignment (including the COALESCE guard that keeps a
stored `_slug`) moves into MagicBulkUpsertSql. MagicBulkHandlerObjectSlugTest
now runs executeUpsertChunk() against a mocked MySQL and PostgreSQL connection
and asserts the prepared statement, instead of grepping the source file; it
fails when the guard is removed and when the handler stops passing the flag.

The move, a single-line withDisplayColumns signature and suppress-with-reason
annotations bring MagicBulkHandler under the phpmd class-length limit and clear
its boolean-flag finding.

Closes review finding bulk-f7 and the MagicBulkHandler part of bulk-f6 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge added

Rename the short closure variables in MagicMapper::findSlugState(), count the
identifier rows without count() in the loop condition, and suppress
ExcessivePublicCount on AuditTrailMapper with the reason the class already
gives for its other size suppressions.

Closes review finding bulk-f6 and the phpmd part of backfill-f8 of #4774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er slug handler

phpcs errors on lines added by the slug review fixes: two lines over 150
characters and the missing $slugHandler parameter doc.

Closes review finding bulk-f6 of #4774 (the phpcs part left from the fixes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A client that re-sends the slug it created the object with (in another case
or format) no longer logs a false "Ignored client slug" warning, in the
single and the bulk path.

Closes review finding r2save-f2 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The behaviour-change entry, the spec delta, the design, the proposal and the
schema docs now give the same rule: lower case, non-ASCII and dots dropped,
cut to 255, a value that slugifies to nothing counts as not sent.

Closes review finding r2save-f1 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A managed schema stores the normalised slug, so the raw seed slug or title
never matched and the seed was inserted again on every import.

Closes review finding r2save-f3 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ixed slug

The spec says the collision warning is always logged; the suffixed outcome of
a restore or a seed import logged nothing although the object silently changes
its public slug.

Closes review finding r2save-f4 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t entry

The union operator kept the planning-time skipped=0 over the count of the
write, so the immutable record said nothing was skipped.

Closes review finding r2routes-f1 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed nothing

A repeated or cron run no longer appends a no-op row to the hash chain; the
console summary still reports it. The spec, design, docs and help text now say
so.

Closes review finding r2routes-f9 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k fails

The cache of the chunks that were written is evicted before the failure
propagates, and the command reports how many slugs were applied and exits
non-zero instead of ending in an uncaught exception.

Closes review finding r2routes-f2 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The entry lists the first 1,000 changes, reduced to uuid, old and new slug,
plus the total; the full list of a larger run goes to the log. The schema docs
state that the slugs are copied into the audit trail.

Closes review finding r2routes-f6 of #4774 (round 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WilcoLouwerse and others added 15 commits October 30, 2026 17:10
…branch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… release branch

Schema keeps development's autoShare (autoPublish was renamed on
Friday) and adds objectSlugSuffix. The @SPEC tags keep the archived
spec paths with #4774's @throws and @SuppressWarnings lines; LogService
imports both sides' classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… recalculation

Both listeners reached development on Friday (#5200, #5201) after the
pinned list of #5162 was written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EnsureTaskKeyUniqueIndex (#5162) and the destruction-list register
version only reach an existing instance on an upgrade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated by hydra-gates' generate_mock_register.py; only the
destructionList objects are taken, the rest of the file is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release: bring development up to Friday 30 October into beta
Merges beta after the 2 November beta release (#5385). The release
workflow opened no sync PR because two files conflicted:
- MapperRegistrar keeps development's AppSettingsInterface and beta's
  WebhookInterceptionCache.
- MigrationHandler keeps development's split into load, check and move
  steps; beta's slug re-check (#4774, #4037) is carried into migrateOne()
  before the update, with the same guards it had in the old loop.

The pinned listener list from #5162 follows development's registrar order.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ble.20261030171000

Schema keeps both new boolean fields: beta's objectSlugSuffix (#4774)
and development's fireEventsOnBulkWrites.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ble.20261030171000

The seed-metadata test keeps beta's slug fixtures (#4774) and
development's plain-insert counter.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 257bb2f

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
test-l10n ✅
test-l10n-parity ✅
format ✅
check-schema-l10n ✅
composer ✅ ✅ 165/165
npm ✅ ✅ 640/640
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ✅ 30212/30212 · 18 skipped
Newman ✅ 714/714
Playwright ⏭️ deferred: this pull request comes from a release or sync branch, which carries only version strings. E2E runs on the promotions.
Hydra gates ❌

Quality workflow — 2026-11-02 23:27 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 4f193ce

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
test-l10n ✅
test-l10n-parity ✅
format ✅
check-schema-l10n ✅
composer ✅ ✅ 165/165
npm ✅ ✅ 640/640
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ✅ 30225/30225 · 18 skipped
Newman ✅ 714/714
Playwright ⏭️ deferred: this pull request comes from a release or sync branch, which carries only version strings. E2E runs on the promotions.
Hydra gates ❌

Quality workflow — 2026-11-03 10:49 UTC

Download the full PDF report from the workflow artifacts.

WilcoLouwerse and others added 3 commits November 3, 2026 12:22
…102161558

chore(release): 2.1.42-beta.20261102161558
…61030171000

Carries the 2.1.42-beta version bump (#5388).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ble.20261030171000

Development merged #5389 (fix/4037-object-slugs-v2), the successor of
#4774 that beta carries, and already holds the #4715 review fixes to
LogService and SaveObjects. Every conflicting file takes development's
version.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 9346e07

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ❌
phpstan ❌
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
test-l10n ✅
test-l10n-parity ✅
format ✅
check-schema-l10n ✅
composer ✅ ✅ 165/165
npm ✅ ✅ 640/640
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌ 30301/30302 · 18 skipped
Newman ❌ 1194/1295 · 1 skipped · 19 request/script errors
Playwright ⏭️ deferred: this pull request comes from a release or sync branch, which carries only version strings. E2E runs on the promotions.
Hydra gates ❌

Quality workflow — 2026-11-03 17:25 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Closed: openregister now develops on main with stableX.Y release branches (ADR-122, hydra#779); development and beta are read-only. The beta-only work is kept in archive/beta-2026-11-09 and is being brought to main separately.

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.

2 participants