notes: shared strict frontmatter splice planner #813

Closed
kayg wants to merge 0 commits from feat/strict-frontmatter-writer into dev
Owner

Plan, sizes and cost

Provide the shared, opt-in pure strict_frontmatter prerequisite for #802 and #808. Input note/frontmatter bytes plus decoded leaf changes produce exact guarded forward/inverse byte splices, or a refusal. No existing caller migrates and no action is enabled. Never merge.

Input metadata <=64 KiB, generated metadata <=128 KiB, complete input/output note <=8 MiB, depth <=8, keys <=1,024, list items <=4,096, changes <=1,024. Requested paths/value payload and total rendered replacements are each capped at 128 KiB. Parsing/auditing are linear in bounded metadata; sorting is O(m log m) comparisons, with request key bytes counted; map lookups add O(log keys) per path component. Full-note construction/inverse verification also count O(note bytes + replacements) time and memory. No Home scan or persistent state.

Failure Effect Detection Recovery Gate
Unsupported YAML, comments or envelope No plan or writes Whole-input lexical allowlist before YAML decode Source correction All three #781 review shapes, BOM/CRLF/EOF, flow/multiline/alias corpus
Duplicate/type/size/depth error No partial plan Decoded unique keys, typed oracle and preflight counters Supported bounded request Core types/i64 overflow, decoded duplicates, limit−1/at/+1
Duplicate or overlapping targets Whole batch refuses Sorted decoded paths and disjoint byte ranges Disjoint leaf request Duplicate, ancestor/child, mixed insertion/replacement cases
Wrong span or serialization No accepted plan Independent non-target line/body audit; output grammar/typed decode Fix planner Authored byte spans, separate semantic model and generated punctuation/list/batch properties
Stale local splice No byte output Expected removed bytes Executor complete-image admission/recovery checks Guard refusal and exact unequal-length inverses

Result

New module only: crates/notes/src/strict_frontmatter.rs and small grammar, lexical, renderer, audit, typed-model and splice modules. The README specifies the full contract. yaml-rust2 with default features disabled supplies the independent YAML decoder; lexical parsing uses JSON decoding for quoted values. Tests use a third decoder (serde_yaml) and authored expected values/spans, never production rendering/expected helpers as their oracle.

The grammar supports exact LF envelopes, two-space block maps, unique safe decoded keys, canonical i64/bool/null scalars, safe atoms, complete JSON strings and scalar block lists ([] only as a flow exception). Any literal hash/comment, interior plain quote, single quote, other flow syntax, physical multiline scalar, anchor/alias/tag, malformed/duplicate key or unsupported envelope refuses the whole input, including unrelated fields. Generated hashes/control/line characters use JSON Unicode escapes. Input and output are both revalidated. Tests exposed and retained two decoder differences: plain NULL and raw DEL; lexical validation and escaping handle them explicitly.

An independent line walk does not consume planner entry spans: every non-target line, blank line and body byte must match. Forward/inverse offsets address their respective original images. No-op values preserve raw spelling. Absent frontmatter can be inserted without changing body bytes; empty envelopes remain on last top-level field removal.

Compatibility and explicit limits

  • No changes to generic Props, Tasks, capture, pin/stamps, identity, merge, room or frontend routes. The existing Obsidian/Tasks/Dataview fixture remains editable through generic Props; rich log/hidden/table-width/link/comment fixtures independently demonstrate that legacy safe unrelated edits still work while the strict API refuses.
  • Targets are leaves under existing maps. Missing parents, whole-map replacement and removal that leaves an empty structural parent refuse. There is no implicit parent creation/removal. Those operations need an explicit extension of this same writer before dependent action enablement.
  • Recurring map-list log remains unsupported. No substitute log representation or permissive fallback is introduced.
  • This is a pure prerequisite, not the executor. Local span guards do not replace complete raw pre/post images, revision/ancestry admission, WAL, recovery or undo checks. Insertion-only plans especially require the executor's complete-image guard. No Flush integration is added.
  • The editor has no implementation of this new strict API. Its existing source/display edits are untouched; no second TS scanner/writer is introduced. Any later strict editor writer must share the authored byte/typed vectors before enablement.
  • Output between 64 and 128 KiB passes the output cap but is read-only to a subsequent plan under the 64 KiB input cap. This is explicit rather than an incidental normalization or truncation.

Verification

All gates ran on calternal-dev-01-compute02, in this branch's VM worktree through the Nix dev shell; every heavy command used the slot wrapper. No build/test/toolchain ran on the control host. Log: ~/strict-fm-final.log on the VM.

cargo fmt --all
cargo fmt --all -- --check
~/bin/slot cargo test -p calternal-notes strict_frontmatter -j4
~/bin/slot cargo clippy --locked -p calternal-notes --all-targets -j4 -- -D warnings
~/bin/slot cargo test --locked -p calternal-notes -j4

Passed: 16 strict-writer tests, including generated property families at 512/512/256 cases plus a retained minimized seed; full notes suite 459 passed / 6 existing ignored / 0 failed; doctests 0. Fmt and clippy passed. Only the VM's formatting and optional-decoder lockfile cleanup were committed after these gates; the tested file bytes are the committed bytes. Nix scaffolding is excluded.

No independent PR review, full frontend matrix, executor durability, action enablement or performance result is claimed. Later action ports retain the plans' compatibility and executor gates.

## Plan, sizes and cost Provide the shared, opt-in pure `strict_frontmatter` prerequisite for #802 and #808. Input note/frontmatter bytes plus decoded leaf changes produce exact guarded forward/inverse byte splices, or a refusal. No existing caller migrates and no action is enabled. Never merge. Input metadata <=64 KiB, generated metadata <=128 KiB, complete input/output note <=8 MiB, depth <=8, keys <=1,024, list items <=4,096, changes <=1,024. Requested paths/value payload and total rendered replacements are each capped at 128 KiB. Parsing/auditing are linear in bounded metadata; sorting is O(m log m) comparisons, with request key bytes counted; map lookups add O(log keys) per path component. Full-note construction/inverse verification also count O(note bytes + replacements) time and memory. No Home scan or persistent state. | Failure | Effect | Detection | Recovery | Gate | | --- | --- | --- | --- | --- | | Unsupported YAML, comments or envelope | No plan or writes | Whole-input lexical allowlist before YAML decode | Source correction | All three #781 review shapes, BOM/CRLF/EOF, flow/multiline/alias corpus | | Duplicate/type/size/depth error | No partial plan | Decoded unique keys, typed oracle and preflight counters | Supported bounded request | Core types/i64 overflow, decoded duplicates, limit−1/at/+1 | | Duplicate or overlapping targets | Whole batch refuses | Sorted decoded paths and disjoint byte ranges | Disjoint leaf request | Duplicate, ancestor/child, mixed insertion/replacement cases | | Wrong span or serialization | No accepted plan | Independent non-target line/body audit; output grammar/typed decode | Fix planner | Authored byte spans, separate semantic model and generated punctuation/list/batch properties | | Stale local splice | No byte output | Expected removed bytes | Executor complete-image admission/recovery checks | Guard refusal and exact unequal-length inverses | ## Result New module only: `crates/notes/src/strict_frontmatter.rs` and small grammar, lexical, renderer, audit, typed-model and splice modules. The README specifies the full contract. `yaml-rust2` with default features disabled supplies the independent YAML decoder; lexical parsing uses JSON decoding for quoted values. Tests use a third decoder (`serde_yaml`) and authored expected values/spans, never production rendering/expected helpers as their oracle. The grammar supports exact LF envelopes, two-space block maps, unique safe decoded keys, canonical i64/bool/null scalars, safe atoms, complete JSON strings and scalar block lists (`[]` only as a flow exception). Any literal hash/comment, interior plain quote, single quote, other flow syntax, physical multiline scalar, anchor/alias/tag, malformed/duplicate key or unsupported envelope refuses the whole input, including unrelated fields. Generated hashes/control/line characters use JSON Unicode escapes. Input and output are both revalidated. Tests exposed and retained two decoder differences: plain `NULL` and raw DEL; lexical validation and escaping handle them explicitly. An independent line walk does not consume planner entry spans: every non-target line, blank line and body byte must match. Forward/inverse offsets address their respective original images. No-op values preserve raw spelling. Absent frontmatter can be inserted without changing body bytes; empty envelopes remain on last top-level field removal. ## Compatibility and explicit limits - No changes to generic Props, Tasks, capture, pin/stamps, identity, merge, room or frontend routes. The existing Obsidian/Tasks/Dataview fixture remains editable through generic Props; rich log/hidden/table-width/link/comment fixtures independently demonstrate that legacy safe unrelated edits still work while the strict API refuses. - Targets are leaves under existing maps. Missing parents, whole-map replacement and removal that leaves an empty structural parent refuse. There is no implicit parent creation/removal. Those operations need an explicit extension of this same writer before dependent action enablement. - Recurring map-list `log` remains unsupported. No substitute log representation or permissive fallback is introduced. - This is a pure prerequisite, not the executor. Local span guards do not replace complete raw pre/post images, revision/ancestry admission, WAL, recovery or undo checks. Insertion-only plans especially require the executor's complete-image guard. No Flush integration is added. - The editor has no implementation of this new strict API. Its existing source/display edits are untouched; no second TS scanner/writer is introduced. Any later strict editor writer must share the authored byte/typed vectors before enablement. - Output between 64 and 128 KiB passes the output cap but is read-only to a subsequent plan under the 64 KiB input cap. This is explicit rather than an incidental normalization or truncation. ## Verification All gates ran on `calternal-dev-01-compute02`, in this branch's VM worktree through the Nix dev shell; every heavy command used the slot wrapper. No build/test/toolchain ran on the control host. Log: `~/strict-fm-final.log` on the VM. ```sh cargo fmt --all cargo fmt --all -- --check ~/bin/slot cargo test -p calternal-notes strict_frontmatter -j4 ~/bin/slot cargo clippy --locked -p calternal-notes --all-targets -j4 -- -D warnings ~/bin/slot cargo test --locked -p calternal-notes -j4 ``` Passed: 16 strict-writer tests, including generated property families at 512/512/256 cases plus a retained minimized seed; full notes suite 459 passed / 6 existing ignored / 0 failed; doctests 0. Fmt and clippy passed. Only the VM's formatting and optional-decoder lockfile cleanup were committed after these gates; the tested file bytes are the committed bytes. Nix scaffolding is excluded. No independent PR review, full frontend matrix, executor durability, action enablement or performance result is claimed. Later action ports retain the plans' compatibility and executor gates.
test(notes): define strict frontmatter locality and refusal contract
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
10aad8388f
kayg changed title from WIP: notes: shared strict frontmatter splice planner to notes: shared strict frontmatter splice planner 2026-10-31 21:02:28 +00:00
Author
Owner

Independent review, round 1

verdict: ready for the scoped pure planner at 11230729efd7356c254336a23cbdd07857733bf9. No P0–P3 findings. No code pushed or merged.

Read the shared brief, all three independent reviews and fix responses on #781, the new module and its tests, and relevant frontmatter/corruption/undo ADRs. Existing callers are unchanged; the public module and decoder dependency are additive.

Checks and evidence:

  • Previous loss cases: whole-frontmatter lexical validation rejects literal hashes, interior plain quotes, commented lists, flow maps/nonempty flow lists, physical multiline scalars, anchors/aliases, unsupported CRLF/BOM envelopes and duplicate decoded keys. Refusal applies even when editing an unrelated key. The retained #781 cases passed.
  • Independent byte audit: crates/notes/src/strict_frontmatter/audit.rs:29 walks raw lines and reconstructs decoded paths itself. It does not call locate, lexical::pair, consume Entry.span, or use proposed splice ranges. It retains blank lines, compares the ordered non-target raw lines, and separately compares the complete body. It shares validated envelope boundaries and the JSON string decoder, not the planner's target-span calculation. My direct audit probes independently changed sibling key spelling, a sibling list item, a blank line, another leaf, a top-level neighbor and body bytes; all six were rejected.
  • Generated YAML and typed results: independent probes use serde_yaml, authored byte boundaries and explicit expected objects, without production render/model helpers. Tested every Unicode scalar through U+FFFF plus three supplementary values as requested strings (63,491 accepted, all decoded exactly), and corresponding BMP JSON Unicode escape spellings as existing input. A separate 1,080-attempt scalar/list lexeme corpus included comments, quotes, flow forms, aliases, tags and multiline continuations; all 81 accepted plans retained the intended third-decoder values and exact inverses.
  • Batches and inverse: 4,000 generated nested-map batches vary quoted/escaped keys, scalar spelling, blank lines, replacement/removal, list removal and same-boundary nested/top-level insertions. Accepted plans use only independently authored target/insertion ranges, preserve neighboring lines/body, match explicit typed expectations, and restore the entire original image exactly with inverse splices. Cases where removing the first child exposes a blank immediately after a map header correctly refuse under the output grammar. Initial probe assertions were corrected for a requested insertion after the last existing key and for that permitted refusal; production code was untouched.

Fresh verification on dev-01 in detached, uncommitted ~/Developer/Worktrees/review-813-r1, using the Nix shell and slot wrapper:

export PATH=/nix/var/nix/profiles/default/bin:$PATH
nix develop -c bash -c 'CARGO_TARGET_DIR=$HOME/Developer/Worktrees/strict-frontmatter-writer/target ~/bin/slot cargo test --locked -p calternal-notes strict_frontmatter -j4 -- --nocapture'

20 passed / 0 failed / 449 filtered out, including the 16 committed tests and four independent review tests. The reviewed source was rebuilt; the target directory only reused build artifacts. Final log: ~/review-813-r1-probes-complete.log. Probe source: ~/Developer/Worktrees/review-813-r1/crates/notes/src/strict_frontmatter/independent_review.rs. Probes and Nix scaffolding remain uncommitted on the VM. No build/test/install ran on the control host. CONTEXT.md and TASTE.md were absent from this checkout.

Scope limits remain explicit: missing parent maps, map-list logs, whole-map edits and empty structural parents refuse. Complete-image admission, durability, recovery and executor integration remain pending. This review does not establish those gates or claim a fresh full notes suite, clippy, frontend or performance run.

# Independent review, round 1 **verdict: ready** for the scoped pure planner at `11230729efd7356c254336a23cbdd07857733bf9`. No P0–P3 findings. No code pushed or merged. Read the shared brief, all three independent reviews and fix responses on #781, the new module and its tests, and relevant frontmatter/corruption/undo ADRs. Existing callers are unchanged; the public module and decoder dependency are additive. Checks and evidence: - **Previous loss cases:** whole-frontmatter lexical validation rejects literal hashes, interior plain quotes, commented lists, flow maps/nonempty flow lists, physical multiline scalars, anchors/aliases, unsupported CRLF/BOM envelopes and duplicate decoded keys. Refusal applies even when editing an unrelated key. The retained #781 cases passed. - **Independent byte audit:** `crates/notes/src/strict_frontmatter/audit.rs:29` walks raw lines and reconstructs decoded paths itself. It does not call `locate`, `lexical::pair`, consume `Entry.span`, or use proposed splice ranges. It retains blank lines, compares the ordered non-target raw lines, and separately compares the complete body. It shares validated envelope boundaries and the JSON string decoder, not the planner's target-span calculation. My direct audit probes independently changed sibling key spelling, a sibling list item, a blank line, another leaf, a top-level neighbor and body bytes; all six were rejected. - **Generated YAML and typed results:** independent probes use `serde_yaml`, authored byte boundaries and explicit expected objects, without production render/model helpers. Tested every Unicode scalar through U+FFFF plus three supplementary values as requested strings (63,491 accepted, all decoded exactly), and corresponding BMP JSON Unicode escape spellings as existing input. A separate 1,080-attempt scalar/list lexeme corpus included comments, quotes, flow forms, aliases, tags and multiline continuations; all 81 accepted plans retained the intended third-decoder values and exact inverses. - **Batches and inverse:** 4,000 generated nested-map batches vary quoted/escaped keys, scalar spelling, blank lines, replacement/removal, list removal and same-boundary nested/top-level insertions. Accepted plans use only independently authored target/insertion ranges, preserve neighboring lines/body, match explicit typed expectations, and restore the entire original image exactly with inverse splices. Cases where removing the first child exposes a blank immediately after a map header correctly refuse under the output grammar. Initial probe assertions were corrected for a requested insertion after the last existing key and for that permitted refusal; production code was untouched. Fresh verification on dev-01 in detached, uncommitted `~/Developer/Worktrees/review-813-r1`, using the Nix shell and slot wrapper: ```sh export PATH=/nix/var/nix/profiles/default/bin:$PATH nix develop -c bash -c 'CARGO_TARGET_DIR=$HOME/Developer/Worktrees/strict-frontmatter-writer/target ~/bin/slot cargo test --locked -p calternal-notes strict_frontmatter -j4 -- --nocapture' ``` **20 passed / 0 failed / 449 filtered out**, including the 16 committed tests and four independent review tests. The reviewed source was rebuilt; the target directory only reused build artifacts. Final log: `~/review-813-r1-probes-complete.log`. Probe source: `~/Developer/Worktrees/review-813-r1/crates/notes/src/strict_frontmatter/independent_review.rs`. Probes and Nix scaffolding remain uncommitted on the VM. No build/test/install ran on the control host. CONTEXT.md and TASTE.md were absent from this checkout. Scope limits remain explicit: missing parent maps, map-list logs, whole-map edits and empty structural parents refuse. Complete-image admission, durability, recovery and executor integration remain pending. This review does not establish those gates or claim a fresh full notes suite, clippy, frontend or performance run.
Author
Owner

Follow-up plan: retain the bounded line parser, restricted target types, exact splices and independent byte audit. Structurally valid non-target plain scalar leaves/lists may be opaque; editing/removing an opaque leaf refuses. The independent YAML decoder checks map/list structure and typed leaves while opaque scalar values require no type agreement. Bounds and O(metadata bytes + note bytes + request sorting) costs are unchanged. Failure → effect → detection → recovery → test: ambiguous syntax or envelope → whole refusal → lexical structure checks → source correction → retained #781 corpus; opaque target → whole refusal → target lookup → explicit source correction → scalar/list target tests; changed non-target bytes → whole refusal → independent raw-line audit → planner correction → exact prefix/suffix/inverse corpus. Gates: fmt, notes clippy -D warnings, full notes tests on dev-01, then merge into #812 only and rerun its documented gates.

Follow-up plan: retain the bounded line parser, restricted target types, exact splices and independent byte audit. Structurally valid non-target plain scalar leaves/lists may be opaque; editing/removing an opaque leaf refuses. The independent YAML decoder checks map/list structure and typed leaves while opaque scalar values require no type agreement. Bounds and O(metadata bytes + note bytes + request sorting) costs are unchanged. Failure → effect → detection → recovery → test: ambiguous syntax or envelope → whole refusal → lexical structure checks → source correction → retained #781 corpus; opaque target → whole refusal → target lookup → explicit source correction → scalar/list target tests; changed non-target bytes → whole refusal → independent raw-line audit → planner correction → exact prefix/suffix/inverse corpus. Gates: fmt, notes clippy -D warnings, full notes tests on dev-01, then merge into #812 only and rerun its documented gates.
Author
Owner

Follow-up implemented at 81c339725bb674710c4ed50ab982a196b355f11c. Non-target single-line plain scalars and scalar block lists may pass through as opaque raw lexemes, including UUIDs, ISO timestamps/dates, non-target numbers, words, URL fragments and IPv6 URLs. Opaque leaves cannot be selected for replacement/removal. Target types and independent raw-line/body byte audit are unchanged. The independent YAML decoder checks opaque scalar/list shape and continues checking typed editable leaves. Existing structural, quote/comment, flow-collection (except the existing empty-list form), multiline, alias/tag, duplicate-key and envelope refusals remain. Existing map/key/depth/size limits remain.

Regression was first observed failing with Grammar on the original writer (~/strict-fm-opaque-red.log). Final gates on dev-01 in the Nix shell, with every heavy command through the slot wrapper (~/strict-fm-opaque-verified.log, ending OPAQUE_VERIFIED):

cargo fmt --all
cargo fmt --all -- --check
~/bin/slot cargo clippy --locked -p calternal-notes --all-targets -j4 -- -D warnings
~/bin/slot cargo test --locked -p calternal-notes -j4

Passed: notes 462 / 6 existing ignored / 0 failed; doctests 0. This includes all 19 strict-writer tests, the retained #781 review cases and generated punctuation refusals, plus real-looking Calternal/Obsidian metadata, exact non-target bytes/inverses, opaque-target refusals and direct opaque-neighbor audit probes. The tested VM formatting is committed. No independent review of this follow-up is claimed; the prior ready review covered 11230729. No merge into dev and no repository settings changed. Next: merge this branch into #812 and rerun its gates.

Follow-up implemented at `81c339725bb674710c4ed50ab982a196b355f11c`. Non-target single-line plain scalars and scalar block lists may pass through as opaque raw lexemes, including UUIDs, ISO timestamps/dates, non-target numbers, words, URL fragments and IPv6 URLs. Opaque leaves cannot be selected for replacement/removal. Target types and independent raw-line/body byte audit are unchanged. The independent YAML decoder checks opaque scalar/list shape and continues checking typed editable leaves. Existing structural, quote/comment, flow-collection (except the existing empty-list form), multiline, alias/tag, duplicate-key and envelope refusals remain. Existing map/key/depth/size limits remain. Regression was first observed failing with `Grammar` on the original writer (`~/strict-fm-opaque-red.log`). Final gates on dev-01 in the Nix shell, with every heavy command through the slot wrapper (`~/strict-fm-opaque-verified.log`, ending `OPAQUE_VERIFIED`): ```sh cargo fmt --all cargo fmt --all -- --check ~/bin/slot cargo clippy --locked -p calternal-notes --all-targets -j4 -- -D warnings ~/bin/slot cargo test --locked -p calternal-notes -j4 ``` Passed: notes 462 / 6 existing ignored / 0 failed; doctests 0. This includes all 19 strict-writer tests, the retained #781 review cases and generated punctuation refusals, plus real-looking Calternal/Obsidian metadata, exact non-target bytes/inverses, opaque-target refusals and direct opaque-neighbor audit probes. The tested VM formatting is committed. No independent review of this follow-up is claimed; the prior ready review covered `11230729`. No merge into dev and no repository settings changed. Next: merge this branch into #812 and rerun its gates.
Author
Owner

Independent review, round 2

verdict: ready for the scoped pure writer at 81c339725bb674710c4ed50ab982a196b355f11c. New P0–P3 findings: none identified. No code pushed or merged.

item round-2 status / evidence
round-1 ready verdict Rechecked the opaque-value extension rather than carrying forward the old approval. Exact splice, output validation and inverse checks remain in place.
ordinary non-target scalars and lists Verified UUID/date/timestamp/number/URL pass-through. Opaque leaves remain unavailable as replacement/removal targets. Independent generated cases preserve the entire authored prefix and suffix, including scalar/list neighbors, nested siblings and CRLF body bytes.
previous #781 comment-loss cases Retained regressions pass. Plain-scalar # and interior-quote/comment combinations refuse, including on unrelated leaves and list items. No accepted comment-loss reproduction found.
structural ambiguity Dedicated refusal probes cover : , leading structural indicators, flow collections, block/multiline scalars, anchors/aliases/tags, document markers, duplicate decoded keys, tabs and CRLF/BOM envelopes. Raw U+2028/U+2029/NEL refuse in scalar and list positions. Unspaced colons and interior punctuation that YAML treats as plain scalar content retain their bytes.
independent audit and target semantics All 6,176 accepted replacement/removal plans from 27,060 generated notes stayed within independently authored target ranges, preserved exact non-target bytes, matched independently constructed serde_yaml expectations, and restored the original image through the inverse. Requested strings included punctuation and U+2028/U+2029/NEL. Direct sibling-byte changes were rejected by the independent audit. No production renderer/model/span helper supplied the expected bytes or semantic values.

Fresh validation on dev-01, detached uncommitted ~/Developer/Worktrees/review-813-r2, at the reviewed head:

export PATH=/nix/var/nix/profiles/default/bin:$PATH
CARGO_TARGET_DIR=$HOME/Developer/Worktrees/strict-frontmatter-writer/target nix develop -c bash -c '~/bin/slot cargo test --locked -p calternal-notes strict_frontmatter -j4 -- --nocapture'

21 passed / 0 failed / 449 filtered out: 19 committed tests plus two independent review tests. Probe source: crates/notes/src/strict_frontmatter/independent_r2.rs; final log: ~/review-813-r2-final.log. The reviewed source was rebuilt; only artifacts were reused. Probes and Nix scaffolding remain uncommitted on the VM. No build/test/install ran on the control host.

This is scoped review evidence, not an exhaustive YAML proof or a fresh full-suite/clippy result. Executor admission/durability, map-list logs and structural parent creation/removal remain outside this pure writer's scope.

## Independent review, round 2 **verdict: ready** for the scoped pure writer at `81c339725bb674710c4ed50ab982a196b355f11c`. New P0–P3 findings: none identified. No code pushed or merged. | item | round-2 status / evidence | | --- | --- | | round-1 ready verdict | Rechecked the opaque-value extension rather than carrying forward the old approval. Exact splice, output validation and inverse checks remain in place. | | ordinary non-target scalars and lists | Verified UUID/date/timestamp/number/URL pass-through. Opaque leaves remain unavailable as replacement/removal targets. Independent generated cases preserve the entire authored prefix and suffix, including scalar/list neighbors, nested siblings and CRLF body bytes. | | previous #781 comment-loss cases | Retained regressions pass. Plain-scalar ` #` and interior-quote/comment combinations refuse, including on unrelated leaves and list items. No accepted comment-loss reproduction found. | | structural ambiguity | Dedicated refusal probes cover `: `, leading structural indicators, flow collections, block/multiline scalars, anchors/aliases/tags, document markers, duplicate decoded keys, tabs and CRLF/BOM envelopes. Raw U+2028/U+2029/NEL refuse in scalar and list positions. Unspaced colons and interior punctuation that YAML treats as plain scalar content retain their bytes. | | independent audit and target semantics | All 6,176 accepted replacement/removal plans from 27,060 generated notes stayed within independently authored target ranges, preserved exact non-target bytes, matched independently constructed `serde_yaml` expectations, and restored the original image through the inverse. Requested strings included punctuation and U+2028/U+2029/NEL. Direct sibling-byte changes were rejected by the independent audit. No production renderer/model/span helper supplied the expected bytes or semantic values. | Fresh validation on dev-01, detached uncommitted `~/Developer/Worktrees/review-813-r2`, at the reviewed head: ```sh export PATH=/nix/var/nix/profiles/default/bin:$PATH CARGO_TARGET_DIR=$HOME/Developer/Worktrees/strict-frontmatter-writer/target nix develop -c bash -c '~/bin/slot cargo test --locked -p calternal-notes strict_frontmatter -j4 -- --nocapture' ``` 21 passed / 0 failed / 449 filtered out: 19 committed tests plus two independent review tests. Probe source: `crates/notes/src/strict_frontmatter/independent_r2.rs`; final log: `~/review-813-r2-final.log`. The reviewed source was rebuilt; only artifacts were reused. Probes and Nix scaffolding remain uncommitted on the VM. No build/test/install ran on the control host. This is scoped review evidence, not an exhaustive YAML proof or a fresh full-suite/clippy result. Executor admission/durability, map-list logs and structural parent creation/removal remain outside this pure writer's scope.
Author
Owner

Closing: head 81c33972 is already in dev (reached via 01dbcbd1); nothing left to merge. Branch kept.

Closing: head 81c33972 is already in dev (reached via 01dbcbd1); nothing left to merge. Branch kept.
kayg closed this pull request 2026-11-04 13:04:46 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!813
No description provided.