Dashboardcraftpublish.yml canonical cwd state hash

publish.yml canonical cwd state hash

Category: gotcha
Confidence: 1.00
ID: 01a03e5b-32f1-7929-94eb-7512eb5f3ebe
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 1
Source session: 0Kjs9yW3R3Q78ax2O
Created: 2026-08-25 15:24:17
Updated: 2026-08-26 13:55:59

Cross-Project Recalls

ProjectHitsLast recalled
cli 1 8d ago

Content

Trap: hashing the textual publish path appears equivalent to Craft’s cwd hash, but packages/../cli and cli name the same directory with different bytes. Fix: publish.yml canonicalizes /github/workspace/__repo__/$CRAFT_PUBLISH_PATH with realpath -m, rejects paths outside the repository root, then SHA-1 hashes that canonical cwd exactly as Craft hashes process.cwd(). Test the actual workflow Set targets shell with root and workspace fixtures; unit-testing a reimplementation misses drift in title repository parsing, cwd hashing, Base64URL workspace encoding, and emitted state payload. Compare parsed JSON rather than literal formatting, because pretty-printing is not state semantics.

Move to: