fix(core): stop minting typed relations from prose tails - #1291
Conversation
An explicit relation line ends at its target or its (context). A prose tail after the wikilink means the line is a sentence: the old behavior minted a junk type from the word before the link and silently dropped the tail, losing any further [[links]] in it. Such lines now fall back to inline links_to handling, keeping every wikilink as an edge and the sentence intact. Hand-authored forms (single-token, quoted multi-word, with (context)) keep their types; the bare capitalized single word with no tail remains ambiguous by shape and is pinned as a known limitation. Refs #1260. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4rbaeHJN3L7CREp5v38J9 Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc7bf71a76
ℹ️ 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".
A tail like '(primary) and [[Beta]] (secondary)' passed the startswith/endswith check as one context and silently dropped the Beta link — the corruption class the prose-tail rule exists to prevent. The opening paren must now close exactly at the final character; anything else is a prose tail and falls back to inline links. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4rbaeHJN3L7CREp5v38J9 Signed-off-by: phernandez <paul@basicmachines.co>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e70713b6e9
ℹ️ 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".
Why
- Added [[Target Note]] to the rosterminted a typed relationAdded, and the tailto the roster— including any further[[links]]in it — was silently dropped from the edge. Measured at 12.3% of typed edges being parse artifacts in a real vault (#1260).What changed
Grammar policy (direction 1 from the issue): an explicit relation line ends at its target or its
(context). Any other trailing text means the line is a sentence, and it falls through to inlinelinks_tohandling — which also preserves every wikilink in the tail (the old explicit path lost[[Beta]]entirely in- relates_to [[Alpha]] and [[Beta]]).Preserved:
- spouse_of [[X]],- requires [[X]] (context), quoted multi-word types,- 使用 [[X]]. Changed deliberately: unclosed-context and nested-bracket edge cases now fall back to inline links instead of minting a typed edge with a mangled tail.Known limitation, pinned in tests:
- Mother [[Target Note]](capitalized single word, no tail) still mints — indistinguishable by shape from a hand-authoredRequires [[X]]. The policy for that case (lowercase requirement / structural anchoring) stays open for discussion on #1260.Verification
Refs #1260 (left open for the remaining grammar-policy discussion).
Credit: analysis, repro, and the measured vault impact are @the issue reporter's — see #1260.
🤖 Generated with Claude Code
https://claude.ai/code/session_01G4rbaeHJN3L7CREp5v38J9