mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 08:11:34 +00:00
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