Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: luvs01/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
# in OMP-managed YAML (treat # as comment only outside quotes)# in OMP-managed YAML (treat # as comment only outside quotes)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0fdbaf26a
ℹ️ 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".
| else quote = null; | ||
| continue; | ||
| } | ||
| if (character === "'" || character === "\"") quote = character; |
There was a problem hiding this comment.
Restrict quote tracking to quoted-scalar starts
When an OMP-managed plain scalar contains an apostrophe or double quote before a real inline comment—for example, name: user's model # keep this note, which is valid YAML—hasInlineComment enters quote mode even though YAML treats that quote as ordinary plain-scalar content. The whitespace-separated # is therefore missed, so refresh or disable proceeds and silently deletes the user-authored comment instead of returning null. Only enter quote state where a quoted scalar can syntactically begin (or use a YAML lexer/CST), and add regression coverage for quoted characters inside plain scalars.
AGENTS.md reference: src/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.
# in OMP-managed YAML (treat # as comment only outside quotes)# in OMP-managed YAML (treat # as comment only outside quotes)
Co-Authored-By: Epinephrine <luvs01@hanmail.net>
|
Fixed in |
|
Already addressed at head by 8043a40 ( |
…range comment scan Co-Authored-By: Epinephrine <luvs01@hanmail.net>
…rator blanks - A '- ' indicator opens a new node: carrying scalarStarted across it made a ' #' inside a later quoted item read as a comment and refuse the patch - A blank after a plain scalar folds only when deeper content follows; a shallower next line means the blank is a separator and stays outside the leaf range instead of being deleted on refresh/remove Co-Authored-By: Epinephrine <luvs01@hanmail.net>
|
Closing: submitted upstream as lidge-jun#5787, rebased onto current |
Motivation
#byte inside a managed block as an inline comment, which also blocked legitimate generated YAML that contains#inside quoted scalars (for example model IDs or names like"provider/model#variant").#, creating an availability/integrity problem for OMP-managed blocks.Description
hasInlineComment(line: string)implementation with a scanner that tracks single- and double-quoted YAML scalars and treats#as an inline comment only when it appears outside quotes and after YAML separation whitespace; the scanner also handles escaped double-quote sequences and doubled single quotes. (change insrc/integrations/omp-yaml-source.ts).childEnd/ container logic remains guarded.)#scalars while still refusing real nested inline comments. (added test cases intests/omp-yaml-source-inline-comments.test.ts).Testing
node_modules/@oven/bun-linux-x64-baseline/bin/bun test tests/omp-yaml-source-inline-comments.test.ts, which passed (4/4 tests passed).node_modules/@oven/bun-linux-x64-baseline/bin/bun run typecheck, which completed successfully.node_modules/@oven/bun-linux-x64-baseline/bin/bun run test; the full suite run exposed unrelated pre-existing failures/timeouts in other tests (lab-live-review regressions and a sideband timeout), so the change was validated with the focused regression and typecheck but a green full-suite run was blocked by unrelated existing failures.Codex Task