Skip to content

fix(curation): record the real author of applied curation changes - #23

Merged
philtief merged 1 commit into
mainfrom
fix/curator-author-label
Sep 29, 2026
Merged

philtief merged 1 commit into
mainfrom
fix/curator-author-label

Conversation

@philtief

Copy link
Copy Markdown
Owner

Problem

_apply_patch hard-coded remote-curator as the created_by of page versions (3 places) and as the origin of inserted links (2 places, SQLite and PostgreSQL). Pages applied by the local curator (#21) were therefore labelled as remote.

Change

  • apply_run takes created_by: str = "remote-curator" and passes it through _apply_group and _apply_patch to all five places. The link origin is now a bound parameter.
  • The default keeps today's label for remote runs, sync apply and resolve_conflict.
  • run_curator passes created_by="local-curator".

Verification

  • A new test checks that a curator-applied page version has created_by == "local-curator" and its link has origin == "local-curator". It failed before the change.
  • Existing curation-sync tests still assert remote-curator for a default apply_run.
  • 240 tests pass, including PostgreSQL, and Ruff is clean. uv.lock is unchanged.

GLM 5.3 Flash wrote the implementation. I reran the PostgreSQL tests outside its sandbox in review.

This pull request and its description were written by Isaac.

`_apply_patch` hard-coded `remote-curator` as the page-version author and
link origin, so pages applied by the local curator were mislabelled.
`apply_run` now takes `created_by` (default `remote-curator`, unchanged
for remote runs, `sync apply` and conflict resolution); the local
curator passes `local-curator`.

Implemented by GLM 5.3 Flash; PostgreSQL tests rerun in review.

Co-authored-by: Isaac <no-reply@databricks.com>
@philtief
philtief merged commit 725634b into main Sep 29, 2026
3 checks passed
@philtief
philtief deleted the fix/curator-author-label branch September 29, 2026 09:33
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