refactor: ChangeLog::recordPartial and column-size truncation

recordPartial() replaces the partial-log FollowUp blocks in content-create,
content-update and post-replace-with-copy; record() truncates ability,
object_type and object_id to their column sizes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
2026-09-26 01:15:13 +02:00
co-authored by Claude Opus 5.5
parent 46a445fe9d
commit 0c4da28855
8 changed files with 94 additions and 47 deletions
@@ -204,12 +204,6 @@ final class ContentCreateAbility implements Ability
private function logPartial(string $postType, string $postId, string $summary): void
{
$ignored = [];
FollowUp::run(
fn () => $this->log->record($this->name(), $postType, $postId, $summary, null, null, 'partial'),
$this->name() . ' change log',
'',
$ignored
);
$this->log->recordPartial($this->name(), $postType, $postId, $summary);
}
}
@@ -247,20 +247,12 @@ final class ContentUpdateAbility implements Ability
throw new WriteFailed(self::REASON, true, $postId, $revisionId, $cause, $detail);
}
$ignored = [];
FollowUp::run(
fn () => $this->log->record(
$this->name(),
(string) $post->post_type,
(string) $postId,
sprintf('"%s": Änderung nur teilweise zurückgenommen', $post->post_title),
$revisionId,
null,
'partial'
),
$this->name() . ' change log',
'',
$ignored
$this->log->recordPartial(
$this->name(),
(string) $post->post_type,
(string) $postId,
sprintf('"%s": Änderung nur teilweise zurückgenommen', $post->post_title),
$revisionId
);
throw new WriteFailed(
self::REASON,
@@ -283,20 +283,12 @@ final class PostReplaceWithCopyAbility implements Ability
try {
$this->cloner->restore($original, $snapshot, $parts);
} catch (Throwable $e) {
$ignored = [];
FollowUp::run(
fn () => $this->log->record(
$this->name(),
(string) $original->post_type,
(string) $originalId,
sprintf('"%s": Austausch nur teilweise zurückgenommen', $original->post_title),
$revisionId,
null,
'partial'
),
$this->name() . ' change log',
'',
$ignored
$this->log->recordPartial(
$this->name(),
(string) $original->post_type,
(string) $originalId,
sprintf('"%s": Austausch nur teilweise zurückgenommen', $original->post_title),
$revisionId
);
throw new WriteFailed(
self::REASON,