Repository navigation
fix(oc-path): preserve comments when filling empty frontmatter values - #180918
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: blocked before merge. What this changesPreserve inline YAML comments when filling empty Markdown frontmatter values. Example: Run openclaw path set 'oc://empty.md/[frontmatter]/key' new on a file containing key: # comment.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 1 item remains This PR fixes a concrete defect still present on fetched main; no actionable defect was identified in the separator repair, and current-head maintainer security approval remains enforced. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe optional OC Path plugin routes CLI file edits through its universal setter and Markdown source-range editor, then writes the resulting bytes. flowchart LR
A[Path set CLI] --> B[Load file]
B --> C[Universal setter]
C --> D[Markdown range editor]
D --> E[YAML value boundary]
E --> F[Preserved source bytes]
F --> G[Write selected file]
Technical reviewBest possible solution: Keep the existing range editor and insert the missing separator before an adjacent YAML comment. Do we have a high-confidence way to reproduce the issue? Fetched-main source exposes the missing separator, matching the retained contributor CLI reproduction; this read-only review did not execute target code. Is this the best way to solve the issue? The repair restores the documented contract in the existing owner, preserves newline and anchor behavior, and needs no additional parser or state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ca6b84a913c3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 26, 2026, 2:16 PM ET / 18:16 UTC (Revision 2). |
…penclaw#184142) * test(memory): define paired embedding prefix contract * fix(memory): format Nemotron inputs and refresh aliased vectors * test(memory): narrow the embedding fixture provider * fix(memory): honor explicit document formats in Gemini * fix(memory): distinguish explicit raw document identity * fix(memory): preserve vectors when adopting Ollama digests
…4775) sortAndLimitSessionEntries used compareSessionEntryPairs as its comparator, which derived pin and timestamp facts on every comparison and allocated a lazily built pinnable set and closure for each list. The sort now computes each entry's timestamp and effective pin once per list into typed arrays, sorts indices, and maps back. Ordering, including ties, pins and activity sorting, is unchanged. compareSessionEntryPairs loses its optional pinnable callback. Evidence, 11 interleaved pairs: sort-path allocation 12,291 -> 10,845 bytes/list (-11.8%, 9/11 better); whole-list allocation flat; CPU inconclusive. The warm benchmark reuses cached selections, so the live effect is likely larger but unproven. 17 focused tests pass. Runtime +3 LOC.
Register the documented session-actor receipt measurement as an exact Knip entry so unused-file analysis recognizes the maintained command without altering runtime behavior.
…kends, and session jobs can't yield (openclaw#183987) * fix(cron): scheduled runs take their automations scope and requester yield from the execution context Scheduled occurrences on embedded and CLI runtimes read the automations scope from context.toolPolicy.automations: the tool is restricted to the run's own job (status, list, get, remove, runs), and a run with no scope gets none. The CLI loopback now carries that self scope, which replaces the automations denial 0d5.10 left on scheduled CLI runs. A self-and-parent-wake scope offers the same self actions; the parent wake action is a follow-up. sessions_yield is refused for every scheduled placement, so session: jobs match isolated ones. The exec target pin also reads from the context. Ingress turns keep their existing CLI surface and yield. Refs openclaw#178812 * fix(cron): session-target runs keep sessions_yield listed and refuse the call A session: run shares its session's tool catalog, and CLI backends hash that catalog for native session reuse, so the definition stays listed and the scheduled callback refuses the call. Child and detached runs still get no sessions_yield. Adds coverage that a CLI run's retained self-scoped automations tool refuses its own job's removal once the run closes, including a close during an awaited Gateway call. * fix(agents): keep the scheduled exec pin on its existing tool-policy source The context copies the same stored exec target, so reading it there changed nothing; keep the existing source until a consumer needs the context's pin. * test(cron): CLI self-removal through the real Gateway cron handler A scheduled CLI run's self-scoped automations tool removes its own job through the in-process Gateway dispatch and cron.remove handler, and the job stays when the run settles while the removal awaits the store. * test(cron): pin the self-and-parent-wake scope to self actions; name session-job losses in Doctor The context can name a parent wake for an owner child, but the wake action is deferred to the automations wake design; a test pins that both runtimes offer own-job self actions only. Doctor's access review describes the CLI automations narrowing and the sessions_yield loss for session-target jobs, under a heading that no longer attributes every loss to creator authority. * test(cron): CLI self-removal settles against the real cron service and store The scheduled CLI run's automations tool removes its own job through the real Gateway cron handlers, CronService and store. When the run settles while the service's removal is held before persistence, the removal is refused and the stored job is unchanged.
…penclaw#184120) Sanitize completion installation status paths and suppress unsafe shell reload hints while preserving literal profile writes and ordinary shell commands. Validation: the regression fails on base and all 30 runtime tests plus 13 CLI consumer tests pass on the reviewed head. Targeted lint/format and exact-head CI pass. Co-authored-by: Alix-007 <[email protected]>
…claw#184157) * fix(sessions): preserve agent transcript IDs across automatic resets Append the existing reset boundary at admitted command persistence so idle and daily resets keep historical messages indexed. Preserve terminal recovery rotation and explicit session-ID resume behavior. Co-authored-by: SeungTaek Lim <[email protected]> * fix(sessions): preserve Gateway automatic reset boundaries Keep the durable transcript ID through Gateway agent preparation, share reset metadata cleanup, and commit the boundary with the renewed lifecycle. Preserve the triggering RPC source during cleanup and the ended transcript window for hooks. Co-authored-by: SeungTaek Lim <[email protected]> * fix(sessions): preserve reset consumer contracts Keep Gateway explicit-ID expiry semantics while preserving transcript IDs. Align voice and Gateway consumer assertions, adapt the in-memory lifecycle fixture, and retain the original patch accessor binding used by restart-settlement tests. * test(gateway): decouple accessor fixture types Define the fixture dependency surface from the accessor contracts instead of importing its parent mock module. This removes the type-only import cycle without changing fixture execution or production code. --------- Co-authored-by: SeungTaek Lim <[email protected]>
…claw#184842) Transfer the fresh scanner result map to reconciliation, reuse tracked path membership, and avoid repeated logical-path lookups on unchanged files. Preserve failed-read retries and cached directory fingerprints.
…w#176941) Prevent the replacement Stop button from accepting an accidental second Send tap for its first 700 ms, while retaining deliberate cancellation and the existing abort owner. Preserve the shared native composer path, view-bound task cancellation/reset and voice-note behavior. Existing native production-timing red/green proof is retained; the web Control UI is unchanged. Co-authored-by: Solvely-Colin <[email protected]> Co-authored-by: Marvinthebored <[email protected]>
…nclaw#184672) Keep accepted workspace preparation pending during temporary source contention, sharing the existing wait budget through checkout and final session binding without repeating setup. Fixes openclaw#184272.
…claw#183770) Load private conversations in native macOS chat through the existing private session-entry document route instead of the public conversation document. Preserve canonical mounted return paths, escaped drafts, authentication and native draft/focus ownership. Validation: five exact-blob Foundation route tests, SwiftLint and repository-pinned SwiftFormat pass; exact-head CI 40257600942 is green. Signed contributor native evidence shows the baseline unavailable document and the final WebView receiving a fresh synthetic chat.inject message. This maintenance pass did not relaunch the native session. Co-authored-by: pstarkgit <[email protected]>
…penclaw#184754) * perf(ui): trim Settings search dependencies Move shared Memory keys into config sections and register only shared session labels for Settings targets, preserving the full catalog order and synchronous registration. * test(ui): measure native Settings root cold loads * perf(ui): keep Settings search out of optional session chunk Share the dependency-free dedupe helper through the existing boot group and keep shared session English copy with the existing English group. Settings retains its search labels without evaluating optional session UI. * test(ui): await lazy chat details before assertions
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
|
/allow-security-sensitive-change |
|
Merged via squash.
|
…openclaw#180918) Preserve inline comments when setting empty frontmatter scalar values. Regression tests cover the original defect and expected supported behavior. Co-authored-by: LinzeShi <[email protected]>
What Problem This Solves
Fixes: filling an empty Markdown frontmatter value absorbs an adjacent YAML comment into the new value.
User Impact
openclaw path setpreserves the comment when replacing an empty value, including anchored fields and CRLF files. For example,key: # commentbecomeskey: new # comment.Why This Change Was Made
An empty scalar's YAML range ends at the comment marker. Preserve a separator before that marker while retaining the existing newline and block-value handling.
Thanks @LinzeShi for the fix and before/after CLI proof. The original contributor commit is preserved.
Evidence
798570bc460f96d8321744be7bb99637d44a5b7d: LF/CRLF files with empty plain or anchored values lose the intended comment boundary. Assertions verify exact output bytes and independently parse the edited YAML.a159cebba8cca9a641dce1e57f985e79a713ce2dpasses all 72 tests inextensions/oc-path/src/cli.test.tswith one worker.9d4827306a89and fixed08328734a080: the base absorbed comments, the fix retained them, and a nonempty-value control remained correct. This is retained contributor evidence; a fresh installed CLI build was not repeated on this Mac. Local tests exercise the repository CLI command boundary.The contributor capture below is retained for inspection; final-head regression results are listed above.
Reproduction and captured output
The command exits 0 on both revisions, but the base writes
key: new# comment; the fix writeskey: new # comment. Other file bytes stay unchanged. The proof runner passes argv directly on Windows.Captured fixed output below has only its temporary directory redacted:
{ "ok": true, "dryRun": false, "bytesWritten": 50, "fsPath": "<temporary directory>/empty.md" }Focused commands:
Enforced security review still requires a maintainer approval for this head. Its notice flags
src/gateway/tool-resolution-authority.tsin the integrated history.