Skip to content

security: remove legacy publish-state-file write#7892

Merged
BYK merged 1 commit into
mainfrom
security/remove-legacy-publish-state-write
Apr 21, 2026
Merged

security: remove legacy publish-state-file write#7892
BYK merged 1 commit into
mainfrom
security/remove-legacy-publish-state-write

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 21, 2026

Summary

Drops the legacy-location write that #7886 added as a rollout aid for getsentry/craft#797. Craft 2.26.0 ships the new-location read/write and is now live on getsentry/craft:latest, so the dual-write is no longer needed.

Context

Verification

  • Pulled the released craft 2.26.0 binary, seeded a state file at the new location only, ran craft publish 9.9.9 against a synthetic repo, and confirmed Craft logged Found publish state file, resuming from there... and honoured the published field to skip the target. End-to-end confirmation of the new-location read path with the 2.26.0 binary.
  • Bash filename generation and Craft's Node filename generation produce byte-identical strings — verified earlier (in security: dual-write publish state file to safe location #7886 description) and unchanged here.
  • YAML still parses (python3 -c "import yaml; yaml.safe_load(...)").

Diff

8 insertions, 17 deletions: the legacy block is removed, comment updated to name the actual Craft PR (#797) that shipped the reader, and the remaining variables lose their new_ prefix since there's only one location now.

Rollback

If something regresses, revert this PR; #7886's dual-write code returns and both locations are written again. Old Craft images would still work off the legacy location.

The dual-write in #7886 was a rollout aid for getsentry/craft#797,
which moved the state file out of the repo checkout into
$XDG_STATE_HOME/craft/. Craft 2.26.0 is released and getsentry/craft:latest
now points at it; Craft reads only the new location.

Drop the legacy cwd write, keep only the safe location. The new-write
logic is unchanged from what #7886 already exercises in production.
@BYK BYK requested a review from a team as a code owner April 21, 2026 20:51
@BYK BYK merged commit 1e38f01 into main Apr 21, 2026
10 checks passed
@BYK BYK deleted the security/remove-legacy-publish-state-write branch April 21, 2026 20:55
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