Skip to content

SEP-2061: Route task-plugin actor lookups through resolve_actor - #1551

Open
yyyyyyyan with Copilot wants to merge 3 commits into
mainfrom
copilot/sep-2061-route-actor-lookups
Open

yyyyyyyan with Copilot wants to merge 3 commits into
mainfrom
copilot/sep-2061-route-actor-lookups

Conversation

Copilot AI commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

System-originated tasks displayed raw UUIDs in Archives, Checksums, MySQL Backups, and Alters, while other task surfaces showed readable labels. This aligns actor rendering across those APIs.

Changes

  • Route the three response builders through resolve_actor:
    "created_by": resolve_actor(task.created_by, mapping)
  • Resolve both created_by and last_updated_by, preserving raw IDs for unknown actors.
  • Update actor-field documentation to include system labels.
  • Cover list, detail, create, and update responses for all four affected plugins.
  • Add framework-level coverage for system-label precedence and retain provider-less fallback coverage.
  • Add a changelog fragment for the API display-value correction.

Co-authored-by: yyyyyyyan <24644216+yyyyyyyan@users.noreply.github.com>
Copilot AI changed the title [WIP] SEP-2061: Route task-actor lookups through resolve_actor SEP-2061: Route task-plugin actor lookups through resolve_actor Sep 16, 2026
Copilot AI requested a review from yyyyyyyan September 16, 2026 18:16
@yyyyyyyan yyyyyyyan added the qa not required Merge without a QA sign-off: substitutes for 'qa passed' in label-gate. Does not skip any test job. label Sep 16, 2026
@yyyyyyyan
yyyyyyyan marked this pull request as ready for review September 16, 2026 19:44
Copilot AI balanced review requested due to automatic review settings September 16, 2026 19:44
@github-actions github-actions Bot added python app:alters PR touches the alters app slice app:archives PR touches the archives app slice app:checksums PR touches the checksums app slice app:mysql_backups PR touches the mysql_backups app slice labels Sep 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Refresh generated API artifacts and update the remaining stale actor descriptions.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates task-plugin APIs to display readable system actor labels instead of raw UUIDs, while preserving fallback behavior.

Changes:

  • Routes actor fields through resolve_actor.
  • Adds coverage across affected plugin endpoints.
  • Updates documentation and changelog.
  • Requires refreshed OpenAPI artifacts and remaining stale descriptions.
File summaries
File Summary
tests/app/sep/apps/mysql_backups/test_api_routes.py Tests actor rendering across routes.
tests/app/sep/apps/framework/test_apps.py Tests label precedence and fallbacks.
tests/app/sep/apps/framework/kit.py Extends task actor fixtures.
tests/app/sep/apps/checksums/test_route_args.py Tests Checksums actor rendering.
tests/app/sep/apps/archives/test_api.py Tests Archives actor rendering.
tests/app/sep/apps/alters/test_api_routes.py Tests Alters actor rendering.
changelog.d/SEP-2061.fixed.md Documents the display correction.
app/sep/apps/mysql_backups/deps.py Resolves MySQL Backup actors.
app/sep/apps/framework/responses.py Documents actor display values; generated artifacts remain stale.
app/sep/apps/framework/apps.py Resolves actors in default responses; related descriptions need updating.
app/sep/apps/alters/deps.py Resolves Alters actors.
Review details

Suppressed comments (1)

app/sep/apps/framework/responses.py:162

  • The actor field descriptions now mention system labels, but build_default_task_response still describes the created_by / last_updated_by override as a "username remap" (around line 286). Since the default builder now injects system labels too, that helper contract is stale and should be updated to describe actor display-value resolution rather than only usernames.
    :param created_by: Display name for the user who initiated the task (system
        label or provider username when resolvable, otherwise the stored user id).
    :param last_updated_by: Display name for the user who last modified the task
        record (system label or provider username when resolvable, otherwise the
        stored user id).
  • Files reviewed: 11/11 changed files
  • Comments generated: 2
  • Review effort level: Lite (auto)

Note

Copilot is running an experiment and ran this review at Lite.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +158 to +162
:param created_by: Display name for the user who initiated the task (system
label or provider username when resolvable, otherwise the stored user id).
:param last_updated_by: Display name for the user who last modified the task
record (Casdoor username when resolvable, otherwise the stored user id).
record (system label or provider username when resolvable, otherwise the
stored user id).
Comment on lines +1336 to +1340
Stamp the app's ``service_type`` and resolve the ``created_by`` /
``last_updated_by`` user ids to system labels or provider usernames through
the bound response context, falling back to the raw id when neither resolves
it. Shared by the list/detail and create/update response surfaces so a
standard app needs no per-app builder; leave ``connectivity_warning`` at the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:alters PR touches the alters app slice app:archives PR touches the archives app slice app:checksums PR touches the checksums app slice app:mysql_backups PR touches the mysql_backups app slice python qa not required Merge without a QA sign-off: substitutes for 'qa passed' in label-gate. Does not skip any test job.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants