Skip to content

fix(platform): an external-ref upsert replaces an existing task's labels with no timeline entry #5216

Closed

Description

@tale-review-bot

Summary

An external-ref upsert that reconciles an existing task replaces the task's whole label list, but the task's timeline records nothing about it. A label a person put on such a task can disappear without a trace, including one the project's dispatch uses to pause work. This is part of tale#4990, whose second question asks whether label changes by agents show in the timeline; the Lead decided they do.

Where

tale-project/tale main df6105cef08a78084439c029d5917611c4adcf54, services/platform/backend/domains/tasks/external-ref.ts:

  • :451-460: when the call names labels, labelIds is resolved from them. Names the project lacks are created unless the caller passes mintLabels: false (:235-239).
  • :565-569: UPDATE app.tasks SET … label_ids = ${labelIds} replaces the list.
  • :607-615: the only activity written is status.changed, and only when the status moved.
  • :638-645: the audit row is updated, with { externalSystem, externalId } and no labels.

Agents reach this path through the tool task_upsert_by_external_ref.

Done when

  • A reconcile that changes an existing task's labels writes labels.changed with its actor and the before and after lists, as a person's edit does (services/platform/backend/domains/tasks/service.ts:1648-1658). Its audit row records the label change.
  • A reconcile that leaves the labels as they were writes no labels.changed.
  • A test covers each case.

Not decided here

Whether a reconcile should change an existing task's labels at all. This change adds the record and nothing else.

Line: stable (a fix of what main ships). Filed by the Lead while deciding tale#4990 (TALE-203, on TALE-292's run of 2026-10-31 14:30 UTC).

Activity

  1. added
    agent-ready
    on Oct 31, 2026
  2. added a commit that references this issue on Nov 1, 2026
    cb8c7f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions