Skip to content

fix(staged): parse notes after inline metadata fences#790

Merged
matt2e merged 1 commit into
mainfrom
note-detection-failing
Jun 15, 2026
Merged

fix(staged): parse notes after inline metadata fences#790
matt2e merged 1 commit into
mainfrom
note-detection-failing

Conversation

@matt2e

@matt2e matt2e commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Strip suggested-next-steps metadata fences before note separator detection.
  • Keep markdown code fences in extracted note bodies intact.
  • Add regression coverage for inline metadata preceding a note separator.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners June 15, 2026 03:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e25d04f493

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +2000 to +2001
while search_from < text.len() {
let Some(rel_pos) = find_suggested_next_steps_opening_fence(&text[search_from..], marker)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve metadata fences inside note bodies

For notes whose body itself includes a fenced suggested-next-steps example after the --- separator, this whole-message stripping loop deletes that body content before extract_note_content returns it, so the stored note is silently corrupted. Limit the removal to the assistant metadata before the selected note separator, or locate the separator first and preserve the original body.

Useful? React with 👍 / 👎.

@matt2e matt2e merged commit dc5c47d into main Jun 15, 2026
5 checks passed
@matt2e matt2e deleted the note-detection-failing branch June 15, 2026 03:53
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