Skip to content

Bug: App comment and dependency writes bypass archived-task protection #3589

Closed

Description

@yannickmonney

Reproduced locally on 44e0dcf254975286c0e9dea443b5cd1ca6b23347 with real Postgres. No production testing.

The public REST comment door refuses archived tasks, but the app comment add/edit/delete domains and dependency add/remove domains omit assertTaskNotArchived. A stale session client can mutate the archived discussion and dependency graph after the archive took effect.

Steps:

  1. Create tasks A/B and archive B.
  2. POST /api/v1/projects//tasks/B/comments answers 403 TASK_ARCHIVED (control).
  3. POST /api/app/tasks/B/comments with the same text answers 200, creates a discussion thread and increments the comment count.
  4. POST /api/app/tasks/comments/ changes that comment successfully; GET B/comments reads the edited text. DELETE the comment succeeds too.
  5. Dependency add/remove on B also return 200; title edit on B refuses TASK_ARCHIVED.

Expected: Every write to an archived task should share the same archived-task gate; comment behavior must agree between app and REST doors, including stale-client calls.

Actual: App comment create/edit/delete and dependency add/remove mutate archived tasks; the public REST comment and task-title control calls refuse the same state.

Source:

  • services/platform/backend/domains/tasks/service.ts:2375
  • services/platform/backend/domains/tasks/service.ts:2444
  • services/platform/backend/domains/tasks/service.ts:247
  • services/platform/backend/domains/tasks/comments.ts:182
  • services/platform/backend/domains/tasks/comments.ts:504
  • services/platform/backend/domains/tasks/comments.ts:600
  • services/platform/backend/rest/v1-tasks.ts:607
  • docs/en/develop/api-reference.md:1145

Evidence: local/task-probe-round2.py, local/task-probe-round2-results.json, local/task-probe-archived-writes.json

Dedup: Cached 931 issue titles show no archived dependency mutation report. GitHub archived review/subtask queries gave no match; request parent final dedup. PR #3554 current head aa95295 inspected: reviewer/erasure handover only, does not change comments.ts, archiveTask or dependency mutation gates.

Limits: Local API boundary reproduction, not a claim that current UI exposes enabled archived dependency buttons. The report names a stale-client write hole.

Acceptance:

  • Archived task comment create/edit/delete and dependency add/remove refuse with TASK_ARCHIVED without changing data/activity.
  • App and REST comments agree on archive enforcement; active task controls continue to pass.
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

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions