Files
Koduri Mahesh Bhushan Chowdary 4cbbccd0a0 fix(workboard): ignore caller-supplied archivedAt when creating a card (#116412)
Archiving is a lifecycle transition owned by archive(), which routes through
updateCard and appends the matching `archived` event. createDirect had no such
guard: it passed input.metadata straight into normalizeMetadata, which treats
archivedAt as an ordinary caller-supplied field.

A card could therefore be created already archived. Archived cards are excluded
from dispatch at every status, so the card was unstartable from the instant it
existed, while its event log contained only `created` - no archive ever
happened, so no `archived` event was ever recorded. The board reported work that
could never start, and the missing event sent operators looking for a rogue
archiver that did not exist.

normalizeMetadata already carries an options bag for rules that are stricter on
create than on update (allowDependencyLinks). Add allowArchivedAt alongside it
and pass false from createDirect, so archivedAt falls back to the create
fallback (undefined) instead of the caller's value. The update path is
unchanged: patches that set archivedAt still archive the card and still emit the
event.

Fixes #116395
2026-08-01 09:15:07 -07:00
..