Skip to content

feat(rows): write rows as objects on api/2 with ?shape=object - #66

Draft
rjzondervan wants to merge 22 commits into
review-base/3096-2from
feat/3096/2-object-write
Draft

rjzondervan wants to merge 22 commits into
review-base/3096-2from
feat/3096/2-object-write

Conversation

@rjzondervan

@rjzondervan rjzondervan commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Internal review draft. This PR exists only to run the review skills on the fork before the upstream PR is opened. The base review-base/3096-2 is feat/3096/1-object-read at 8ea1002 (the head of #65, merged into this branch), so the diff shows only this PR's own commits. The upstream PR description will be written separately.

Part 2 of 2 of nextcloud#3096, split from #64: #65 reads rows as objects, this PR writes them. Depends on #65, nextcloud#3095 (#63) and nextcloud#3093.

Changes

  • ?shape=object on POST /api/2/{tables|views}/{nodeId}/rows and PUT .../rows/{rowId} accepts the same flat object feat(rows): read rows as objects on api/2 with ?shape=object #65 returns, keyed by technical name; the response comes back in the object shape too. A value that is the one its cell is read as (the same instant, the same link url/title/provider, a usergroup without display names, a relation by uuid or by its row id as a JSON integer) is neither validated nor written again, so a row that was read can be written back unchanged, also with stale cells (a deleted user or option, a lowered limit, a datetime with seconds or in an unknown format), and an unchanged link or usergroup is not rewritten. A differently spelled value counts as unchanged only when it is itself valid. A relation whose target was deleted reads as null; writing it back clears a writable relation and leaves a read-only or mandatory one as it is.
  • Input per column type, strictly: relations by uuid, row id or label, where a string is looked up as a label before a row id (one message for every relation that cannot be resolved, so the API does not reveal whether a uuid exists); a multi-selection as a list of option ids; a checkbox as true/false or "true"/"false"; a number as a number or numeric string; datetimes as ISO 8601 to the minute (seconds other than 00 refused; without an offset read in the instance's default_timezone, a wall time in a daylight-saving gap is refused, and so is a time in the repeated autumn hour that cannot be stored as the given instant); links as {title, url, providerId} with string parts; a list only for multi-selection and usergroup columns.
  • Validation in the object shape is strict: a value that cannot be stored as given is refused instead of being stored as empty or as something else. The request gets a 400 whose errors object names every invalid property, sorted by name, mandatory columns and value limits included (RowValidationError, handled in AOCSController); the message only gives the count. A changed value is validated as above; in a column that is read-only in the view it is reported. A key that is not a column of the table or view is reported; a property name that is a number (also a list) is a 400 before anything is looked up, so errors stays keyed by name (handleRowValidationError). The stored relation targets of a write are looked up in one query; each relation given by uuid is resolved on its own.
  • The object shape is JSON-only for now, as on the read routes of feat(rows): read rows as objects on api/2 with ?shape=object #65: a write in the object shape whose response would be XML (format=xml, an XML Accept header, or neither) is a 400 before anything is written. An XML serialization follows on its own branch.
  • The cells shape and its lenient validation are unchanged.
  • The object shape is refused on federated tables and views; federation is looked up once per request.
  • New RowObjectInput, RowObjectInputConverter, RowValidationError; openapi.json and openapi.ts regenerated.

Checks run locally

  • On this head: phpunit 873/873, Behat APIv2.feature @rows 14/14, psalm, cs and rector clean, openapi.json and openapi.ts regenerate without a diff.
  • Live on a dev instance (round 1 fixes): invalid multi-selection, checkbox, impossible date and a list for a text column each give a 400 on their property and store nothing; a row read with ?shape=object is written back unchanged with a 200.

Follow-ups (predate this PR, cells shape)

  • A list sent to a text column gives a 500 and leaves an orphan row (Row2Mapper::insert has no transaction); the checkbox type stores any string as false; the multi-selection type casts labels to option ids; "0.0" is refused for numbers.
  • Create and update responses carry null or stale metadata (createdBy/createdAt, previous lastEditAt).
  • Row2::insertOrUpdateCell compares loosely (!=), so e.g. "1.0" over "1" counts as unchanged; an unchanged usergroup cell is marked as changed because the stored cell has displayName.
  • PUT /api/2/.../rows/{rowId} with data as a {columnId: value} map gives a 500 (RowDataInput.php:90).

🤖 Generated with Claude Code

Create and update accept, with shape=object, the same flat object the
read side returns, so a row that was read can be written back
unchanged. Relations are accepted by uuid, row id or label. A value
that cannot be stored as given is no longer stored as empty: the
request is refused with a 400 that names every invalid property. The
cells shape and its lenient validation are unchanged.

Closes nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Comment thread lib/Service/RowService.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Errors/RowValidationError.php Resolved
Comment thread lib/Controller/RowOCSController.php Resolved
Comment thread lib/Controller/RowOCSController.php Resolved

@rjzondervan rjzondervan left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES (Strict) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)

Status: all 17 findings are addressed in a6024c0f, 625e7235, efb106aa, 5641551e, ca664750, 586f97bd (16 fixed; the stale metadata in write responses predates this PR and is a follow-up), after two pre-push checks; all threads are resolved. phpunit 786/786; live on the dev instance the four blockers now give a 400 on their property and store nothing, and a row read with ?shape=object is written back unchanged. A re-review decides the verdict.

4 blockers and 7 concerns. All four blockers break the PR's central promise that an invalid value gets a 400 on its property instead of being stored silently, and each one reproduced live on the dev instance. The concerns are about the relation lookup, read-only view columns, the error body and tests that do not pin the strict and lenient paths. The fixes follow as new commits on this branch.

🔴 Blockers

🟡 Concerns

🟢 Minor

✅ Verified clean

  • Create and update keep RequirePermission(CREATE/UPDATE) and run the same service checks as the cells shape: permissions, value limits, validateValue, mandatory columns.

  • Read access to a relation target is still enforced (canReadRelationTarget); the relation lookup concern is only about its error messages.

  • The lenient cells path matches the old code branch for branch (same exceptions, order and first error); the lenient-path concern asks for a test that pins it.

  • RowValidationError extends BadRequestError, so every existing catch still maps it to a 400, and the OpenAPI 400 union matches the PHP.

  • The object shape is refused on federated tables and views before anything is written.

  • Scope: the single commit e3ac83f7 (17 files, +899/−73) against review-base/3096-2 (#65's head).

  • Checks on this head: phpunit 739/739, psalm, cs and rector clean, openapi up to date. Gates: the runner is not available for this repo, so the repo's own checks stand in. CI was still queued.

  • Live on the dev instance: all four blockers reproduced (200 with [], "false", March 2; a 500 that leaves a row behind), and the stale @self metadata was found there.

  • Connected issues: nextcloud#3096 (open; closed by this PR on merge); depends on nextcloud#3095 (#63) and nextcloud#3093, both open.

🤖 Generated with Claude Code

rjzondervan and others added 7 commits November 18, 2026 16:19
Signed-off-by: Robert Zondervan <robert@conduction.nl>

# Conflicts:
#	lib/Service/RowObjectSerializer.php
…ng else

A multi-selection that parses to an empty list is now reported instead of
stored as empty. A checkbox takes only true, false, "true" and "false". A
datetime whose day or time does not exist is refused instead of rolled over
to another date. A list is accepted only by multi-selection and usergroup
columns, so a list sent to a text, date, time or single selection column is
a 400 on that property instead of a TypeError and a partly written row.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
…t shape

A changed value for a read-only column of a view is reported on its property
instead of dropped; an unchanged one still passes, so a row that was read can
be written back through the view. An unknown relation uuid gets the message
of a row outside the relation target, so it no longer tells whether a row
exists elsewhere. Data that is a JSON list instead of an object is a 400
before the row service is called, so errors stays an object.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Limit violations are collected with the other invalid values, the cells
shape still stops at the first missing mandatory column, and the round trip
now includes usergroup, link and relation columns, a column without technical
name and a write-back through a view with a read-only column. A relation
whose target was deleted reads as null and is cleared when written back.

The write-back promise in the serializer and converter now names its
exception: a cell that refers to a user, group or selection option that no
longer exists is reported on its property.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A datetime with seconds other than 00 is refused instead of truncated to
the minute. A numeric string such as "0.0" is passed on as a number, so the
number column no longer refuses it. A link title or providerId that is not a
string is refused instead of cast. The validation message counts the invalid
values instead of repeating the caller's keys, which stay in errors. The
federation of the node is looked up once per write, and the refusal of the
object shape is tested on federated views as well.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A null for a checkbox stays null instead of becoming "false", and an empty
value or a relation to a deleted row counts as unchanged for a read-only
column of a view, so such rows can be written back. A multi-selection is
written as the list of option ids it is read as; a string of labels is
refused instead of dropping unknown labels. A wall time in the daylight
saving gap is refused instead of moved by an hour. Numeric keys are refused,
so errors is always an object, and errors are sorted by key, so their order
does not tell whether a relation uuid exists. The round-trip docblocks name
the datetime exception, and one invalid value is counted in the singular.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A column whose technical name looks like a number arrives with an
integer key; only a list is refused now, and errors is always encoded
as a JSON object. The round-trip docblocks name every value that can
no longer be stored as it was read, and what read-only columns do.
The daylight saving check runs without the offset guard, which never
changed its outcome.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Comment thread lib/Service/RowService.php Resolved
Comment thread lib/Service/RowObjectSerializer.php Resolved
Comment thread lib/Controller/AOCSController.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Model/RowObjectInput.php Resolved
Comment thread lib/Service/RowObjectSerializer.php Resolved

@rjzondervan rjzondervan left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES (Strict) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)

Status: all round-2 findings and the reopened round-trip thread are addressed in 05e0bb13, 13e33c98, 9be784cf, d7795251, 79c7219d, 6f7145e7, dbede975, c34db7c9, after three pre-push checks (the last clean); all threads are resolved. One behaviour changed by design: a value written back as it is read is left out, so stale cells can be written back unchanged. phpunit 847/847. A re-review decides the verdict.

Round 1's four blockers stay fixed, and 15 of 17 findings are addressed. The read-only comparison those fixes added introduces a new blocker: an unchanged link through a read-only column gets a 400. Round 2 adds 1 🔴, 3 🟡 and 2 🟢, all from the fixes, and reopens the round-trip thread. The fixes follow as new commits on this branch.

Round Found Status
1 (e3ac83f7) 🔴 4 · 🟡 7 · 🟢 6 15 resolved, f17 a follow-up by decision; the round-trip thread reopened (partly addressed)
2 (586f97bd), this review 🔴 1 · 🟡 3 · 🟢 2 open
Finding Was Now Where
Write-back exceptions: stale read-only values are still refused 🟡 partly addressed, reopened thread
🔴 Unchanged link written through a view with a read-only link column gives a 400 new new thread
🟡 Read-only columns with stale values are still refused, contrary to the new docblock new new thread
🟡 errors as stdClass is rendered empty in ?format=xml responses new new thread
🟡 Datetime in the first occurrence of the fall-back hour is stored as a different instant new new thread
🟢 List refusal still blocks numeric technical names and is no longer needed for the encoding new new thread
🟢 PR body's write-back exceptions and read-only sentence out of sync with the docblock and code new new thread
Details of this round
  • Scope: the fix commits a6024c0f, 625e7235, efb106aa, 5641551e, ca664750, 586f97bd (0d768960..586f97bd, 10 files, 679 lines) and the merge 0d768960 of #65, whose resolution is clean.
  • Verified clean: The cells path behaves as before (every new branch is gated by the strict flag); the federation refactor refuses the object shape on every federated branch and looks federation up once; the four round-1 blockers stay refused; the merge took #65's code unchanged.
  • Checks on this head: phpunit 786/786, psalm, cs and rector clean, openapi unchanged; CI php-cs, openapi and stylelint green, the rest queued. Gates: the runner is not available for this repo, so the repo's own checks stand in.
  • Connected issues: nextcloud#3096 (open); depends on nextcloud#3095 (#63) and nextcloud#3093, both open.

The counts steer the next round: fix rules ON — 9 of 10 round-2 findings across #65 and #66 were introduced by the fixes (1 copy missed), so every round-3 fix goes through the class sweep and a pre-push check that repeats until it comes back clean.

🤖 Generated with Claude Code

rjzondervan and others added 12 commits November 19, 2026 10:11
The errors were cast to an object so that names that look like numbers
still gave a JSON object, but OCS renders an object as an empty element
in XML, and the cast no longer matched TablesRowValidationError. The
errors are an array again, and a property name that is a number is
refused before the row is converted: a technical name starts with a
letter, so such a name never matches a column, and refusing it keeps
the errors keyed by name in both formats. This also refuses a list,
which has only numbers as keys.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A read-only column compared the written value with the stored cell
loosely, in storage form, after validation. A link stored by the UI,
with a subline and unescaped slashes, never matched the JSON the
converter builds, so an unchanged link was refused, and a stale value
(a deleted user, a number above a lowered maximum, a relation outside
the target view, a datetime with seconds, in an unknown format or in a
daylight saving gap) was refused by the validation before the
read-only check ran.

Before a row in the object shape is converted, each value is now
compared with the value its cell is read as, through the serializer,
so that two spellings of one value match: a datetime by its instant, a
link by url, title and provider, a usergroup without display names, a
relation by uuid or row id. A value that matches is left out: it is
neither validated nor written again, so a row that was read can be
written back unchanged and an unchanged link is no longer rewritten.
A null for a relation to a row that no longer exists is still written,
so that it clears a writable relation. A read-only column is always
left out, and reported only when its value differs.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A datetime column stores the naive local minute, so the two
occurrences of 02:30 on the night daylight saving time ends are stored
alike and read back as the second one. A datetime given as the first
one, such as 2026-10-25T02:30+02:00 in Europe/Amsterdam, was stored as
another instant with a 200. A datetime whose stored minute does not
read back as the given instant is now refused, with the instant it
could be stored as.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Comparing the given values with the values their cells are read as
looked up the uuid of a relation target once per relation property.
The stored relation ids of one write are now looked up in one query.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A value spelled differently from the one a cell is read as counted as
unchanged even when the converter refuses it, such as February 30 for
the March 2 it rolls over to, option ids as strings or floats, a
usergroup type as a string, a link title as a number, or a list for an
empty text. Such a value was left out silently. It now counts only when
the converter accepts it, so it is reported; the value exactly as it
was read still counts, also when the converter would refuse it.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A relation to a row that no longer exists reads as null, and writing
that null back clears the relation. In a column that is mandatory in
the table or the view, the clearing was then refused as a missing
mandatory value, so such a row could not be written back unchanged.
The null is now left out for a mandatory column, which keeps the
stored relation; a writable relation that is not mandatory is still
cleared.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
A read-only relation to a deleted row keeps its stored id, a link
stored as a plain URL and a relation to a row outside the target table
are written back without being rewritten, and a selection option that
no longer exists is written back through a read-only and a writable
column.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
handleBadRequestError() added the errors of a RowValidationError to a
body typed as array{message: string}, so psalm could not check them
against TablesRowValidationError. The row routes now catch a
RowValidationError on its own and answer it with
handleRowValidationError(), typed as TablesRowValidationError.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
… trip

The read side added a time column to the serializer test's columns;
a column without a stored value is read as null, so writing the row
back gives null for it too.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Create and update parse the shape with the same check as the read
routes, so a write in the object shape that would be answered in XML
is a 400 before anything is written, instead of a row that is stored
and then cannot be returned.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
The create and update routes document the 400 for the object shape
with a response that is not JSON, before anything is written. The
error test checks what is reachable, the JSON response; the docblock
of RowObjectInput no longer gives XML as a reason.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Comment thread lib/Service/RowObjectInputConverter.php Resolved
Comment thread lib/Service/RowObjectInputConverter.php Resolved

@rjzondervan rjzondervan left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES (Strict, round-3 convergence) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)

Status: the blocking finding is fixed in 178d54fa and e69d7efd (only an integer is taken as the stored row id; a target without a uuid is tested), after a pre-push check without blockers; both minors are resolved (a correction on the r2-3 thread, the PR description). All threads are resolved. phpunit 873/873. A short re-review decides the verdict.

Round 3 under the convergence rule: all seven round-2 points hold on the code and the merge of #65 is clean. One new 🟡 blocks, because it sits in code the round-2 fixes introduced: a relation given as a digit string is taken as the stored row id, so a write by label can be dropped silently. Two 🟢 are claim corrections and do not block. The fix follows as a new commit on this branch.

Round Found Status
1 (e3ac83f7) 🔴 4 · 🟡 7 · 🟢 6 16 resolved, metadata of write responses a follow-up by decision
2 (586f97bd) 🔴 1 · 🟡 3 · 🟢 2, round-trip thread reopened all resolved
3 (20090f63), this review 🟡 1 · 🟢 2 open
Finding Was Now Where
Unchanged link through a read-only column gives 400 🔴 addressed thread
Stale read-only values refused 🟡 addressed thread
errors empty in XML 🟡 addressed (object-shape writes are JSON-only now) thread
Repeated autumn hour stored as another instant 🟡 addressed thread
🟡 A digit string for a relation is taken as the stored row id, so a write by label is dropped new new, blocks thread
🟢 The r2-3 reply names a test that 20090f6 replaced new new thread
🟢 "Relation targets are looked up once per write" only holds for the stored targets new new thread
Details of this round
  • Scope: the eight fix commits 586f97bd..c34db7c9, the merge 3aafa6cd of #65 (clean: #65's findPage change touches only the read path), and 08d641f6, 1f42d4a0, 20090f63 after it.
  • Verified clean: every write route refuses the object shape for a non-JSON response before any decoding, lookup or write; the only stored values that read as null are empty cells and a relation to a deleted row, which is cleared, kept (mandatory) or left (read-only) as documented; a null left out for a mandatory column still gets the error on create; docs, openapi.json and openapi.ts agree.
  • Checks on this head: phpunit 871/871, Behat APIv2 @rows 14/14, psalm, cs and rector clean, openapi up to date. Gates: the runner is not available for this repo, so the repo's own checks stand in.
  • Connected issues: nextcloud#3096 (open; closed by this PR on merge); depends on #65, nextcloud#3095 (#63) and nextcloud#3093, all open.

The counts steer the next round: fix rules ON — the blocking finding came from the round-2 fixes and both minors are copies they missed, so the round-3 fix goes through the class sweep and a pre-push check until it comes back clean.

🤖 Generated with Claude Code

rjzondervan and others added 2 commits November 19, 2026 11:49
A relation given as a string is a uuid or a label, which the relation
type looks up label first; a label of digits equal to the stored row id
was taken as unchanged and the write was dropped. Only an integer now
counts as the row id when comparing with what the cell is read as.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
The comment in matchesRead says what the comparison does, not how the
relation type reads strings: a digit string that matches no label is
still stored as that row id. A new test covers a target without a
uuid: the integer row id is read as unchanged, the digit string is not.

Refs nextcloud#3096

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>

@rjzondervan rjzondervan left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE (Strict, round-3 convergence) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)

Round 4 finds nothing new. The one blocking finding of round 3 is fixed and pinned by tests, both minors are resolved, and every thread is closed. Nothing stands between this PR and a merge.

Round Found Status
1 (e3ac83f7) 🔴 4 · 🟡 7 · 🟢 6 16 resolved, metadata of write responses a follow-up by decision
2 (586f97bd) 🔴 1 · 🟡 3 · 🟢 2, round-trip thread reopened all resolved
3 (20090f63) 🟡 1 · 🟢 2 all resolved
4 (e69d7efd), this review — nothing new
Finding Was Now Where
A digit string for a relation is taken as the stored row id 🟡 addressed: only an integer counts as the row id; a string is compared as a uuid and otherwise resolved on write, label first thread
The r2-3 reply names a replaced test 🟢 addressed: correction on the r2-3 thread thread
"Relation targets are looked up once per write" 🟢 addressed: the PR description says only the stored targets are batched thread
Details of this round
  • Scope: 20090f63..e69d7efd, two commits (2 files, 13 lines): the fix in RowObjectInputConverter::matchesRead() and its tests. Reviewed inline (XS).
  • Verified clean: an integer row id sent back for a target with or without a uuid still counts as unchanged; a uuid in any case still counts as unchanged; a digit string now goes through convert() and the relation type (label first, then id), so it is never dropped; the comment says what the comparison does. The test case 'a label of digits equal to the stored row id' fails with the old condition; testARelationToATargetWithoutAUuidIsReadAsItsRowIdOnlyAsAnInteger covers a target without a uuid.
  • Checks on this head: phpunit 873/873 (the converter and object-shape tests re-run here: 76/76), psalm, cs and rector clean; CI php-cs, openapi and stylelint green, the rest queued. Gates: the runner is not available for this repo, so the repo's own checks stand in.
  • Follow-ups (outside this PR): create and update responses carry null or stale metadata in both shapes; a no-op write still fires RowUpdatedEvent; an XML serialization of the object shape on its own branch.
  • Connected issues: nextcloud#3096 (open; closed by this PR on merge, together with #65); depends on #65 (approved), nextcloud#3095 (#63) and nextcloud#3093.

🤖 Generated with Claude Code

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