Add plants:align_visibility for the ECHOcommunity plant migration - #118
Merged
Conversation
Aligns Plant API visibility with ECHOcommunity's editorial state, which decides whether a plant is published (migration decision D-007) and whose deletions after the 2020 export are authoritative (D-014). The state arrives as a file rather than a live connection, so this application never holds a handle on ECHOcommunity's database (D-029). Only plants owned by the given organization are touched, and only where visibility actually differs. A plant absent from the status file is left alone: that is true of the 107 contributed plants and the 2026-08-07 Acacia split, and silence is not evidence of deletion. A spec pins that. Rehearsed against staging: 73 changed (67 ECHOcommunity drafts to draft, 6 deletions to deleted), 319 already correct, 0 failures. The migration guard then reported PASS - 319 published on both sides, nothing would vanish or appear. Full suite 2319 examples, 0 failures. Rubocop clean.
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of the plant-data ownership migration, and the companion to #117.
Aligns Plant API visibility with ECHOcommunity's editorial state. ECHOcommunity
decides whether a plant is published, and its deletions made after the 2020
export are authoritative — several plants it removed years ago are still public
in the API today.
The status file is produced by the migration workspace, so this application
never holds a connection to ECHOcommunity's database.
Behaviour worth reviewing
ECHO_ORG_IDare considered, and only those whosevisibility actually differs are written.
contributed plants and the three species created by the 2026-08-07 Acacia
split — records that legitimately exist only in the API. Silence in the file
is not evidence of deletion, and there is a spec pinning that.
published → public,draft → draft,deleted → deleted, appliedthrough
update!so the visibility trio and PaperTrail behave normally.Rehearsed against staging
After #117's import ran, this task changed 73 records — 67 ECHOcommunity
drafts to
draftand 6 deletions todeleted— with 319 already correct and nofailures. The migration's cutover guard then reported:
That is the Phase 1 exit criterion met in the rehearsal environment: a cutover
would change nothing publicly.
Independent of #116 and #117; can merge in any order.