fix: keep portfolio registry notes idempotent#151
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7de15cf8ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| while value == purpose or value.startswith(f"{purpose} "): | ||
| value = value[len(purpose) :].strip() |
There was a problem hiding this comment.
Preserve manual notes that start with the purpose
Because this normalization now runs for every legacy_registry_path, not just registries known to be generated by portfolio_truth_render, a hand-maintained legacy row whose Notes text legitimately begins with the repo/group purpose gets rewritten in the canonical snapshot. For example, with purpose API migration and notes API migration blocked on auth, the loop removes the leading phrase and stores only blocked on auth in declared.notes; scope the stripping to generated registry input or another unambiguous generated prefix so legacy source text is not silently lost.
Useful? React with 👍 / 👎.
Summary
Verification