fix(memory): preserve fenced code in entry boundaries #5363
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 285 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.338
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5363"
general
weight: 0.35
seekskyworld
Summary
Fenced Markdown examples remain part of their containing memory entry. A README template containing
## Installationno longer creates a phantom entry, truncates the editor range, or leaves half a proposal behind during approval. All four entry scanners share the fence tracker.Metadata comments indented by four spaces or a tab are preserved as code content, so a nested example cannot replace a hand-authored entry's ID/status. An unclosed fence deliberately keeps later headings as literal content through EOF; the parser, lookup and prompt projection now have explicit coverage for that behavior.
Fixes #5361
Verification
recipes / activebecomeshijack / archived. Both pass after the fix, covering parsing, editable ranges, status updates and prompt content.AI use
Tool(s) and scope: OpenAI Codex investigated the issue and review feedback, authored the changes and tests, and ran validation. This is an automated PR update. Commits include Signed-off-by and Generated-by trailers; final review and merge remain human decisions.
Checklist
Does this PR entail a change in behavior?
Compatibility note: hand-edited metadata indented four or more spaces, or ending in non-ASCII whitespace such as NBSP, is ignored and falls back to the heading-derived identity. App-written metadata remains at column zero and is unaffected.