Skip to content

chore(changelog): record the task_delete cascade deployment on stage - #185

Closed
aaron-tsar wants to merge 1 commit into
previewfrom
chore/changelog-task-delete-stage-deploy
Closed

aaron-tsar wants to merge 1 commit into
previewfrom
chore/changelog-task-delete-stage-deploy

Conversation

@aaron-tsar

Copy link
Copy Markdown
Contributor

What

Records in patches/changelog.txt that common/procedures/task/task_delete.sql was deployed to the stage endpoint on 2026-09-21.

No routine changes here — the cascade has been in this repository since 569976f (2026-08-21) and preview and main agree. Only stage was behind.

Why it mattered

Stage was running the parent-only version, so deleting a task with subtasks left every child behind as an orphan: on no board, removable by nothing.

The stale copy is detectable from a client without database access. The old body ends in SELECT ROW_COUNT() AS affected and ROW_COUNT() is BIGINT, so affected arrives as a string; the current body assigns it to a DECLARE … INT local first, so it arrives as a number. In one probe run against one session, task.comment_delete already answered with a number while task.delete answered with a string — which is what proved a deployment gap rather than a logic bug.

What was applied

  • All 1492 entity databases: 989 hub, 450 drumate, 53 organization.
  • The /tmp/drumee-template-{hub,drumate}.sql factory caches were rebuilt. A new workspace is cloned from them and they still held the old routine, so patching the live databases alone would have left every workspace created afterwards broken.

Verified on a freshly provisioned hub: affected came back a number, the subtask id was returned, and the subtask was actually gone. 77 task contract probes, 0 blocked.

One thing for whoever patches next

bin/patch.js on the stage host is older than this repository. Its common target reads type IN ('drumate','hub') where this repo reads type IN ('drumate','hub','organization'), so it silently skipped all 53 organization databases — they had to be patched by listing them explicitly. Worth updating the host checkout before the next common run.

150 further databases still carry the old routine. None has an entity row and none holds any task row, so nothing reachable by the product runs them.

The routine has carried the cascade here since 569976f, but stage was still
running the parent-only version, so a task with subtasks left orphans behind.
Applied to all 1492 entity databases and the factory template caches, which
had to be rebuilt because a new workspace is cloned from them.

Also records that bin/patch.js on the stage host is older than this repository
and its common target silently skips every organization database.
@aaron-tsar

Copy link
Copy Markdown
Contributor Author

Superseded by #187, which carries this change cherry-picked onto preview together with the other two open PRs.

@aaron-tsar aaron-tsar closed this Sep 22, 2026
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