Skip to content

Canary green again on source-hygiene: viewstate_rag.rs's tests move out, its unwrap_or says why (card a0790c4b) - #5193

Merged
joelteply merged 2 commits into
canaryfrom
a0790c4b/canary-is-red-on-source-hygiene-5015-gre
Oct 19, 2026
Merged

joelteply merged 2 commits into
canaryfrom
a0790c4b/canary-is-red-on-source-hygiene-5015-gre

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

#5015 (merged 17:16Z, built against an older base) added 138 lines to
persona/viewstate_rag.rs, already past 1,000, and one production unwrap_or
without a same-line reason, so canary 89a337c failed source-hygiene for
every PR: lines past 1000 158,103 vs 157,971, unjustified unwraps 2,140 vs
2,139 (measured on canary alone, IntelMac, clean rebuild).

  • viewstate_rag.rs's test module moves to persona/viewstate_rag/tests.rs
    (#![cfg(test)]): 1,458 -> 771 lines.
  • viewstate_rag.rs:557's unwrap_or(Null) gets its reason on the line: an
    unstamped cursor is Null, never a fingerprint, so it is refused below by
    design (the comment above already said so; the ratchet reads the line).
  • BASELINE_LINES_OVER 157,971 -> 157,645, measured on this tree.
    source-hygiene 37/37. Not compiled here; CI compiles.

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…ut, its unwrap_or says why (card a0790c4b)

#5015 (merged 17:16Z, built against an older base) added 138 lines to
persona/viewstate_rag.rs, already past 1,000, and one production unwrap_or
without a same-line reason, so canary 89a337c failed source-hygiene for
every PR: lines past 1000 158,103 vs 157,971, unjustified unwraps 2,140 vs
2,139 (measured on canary alone, IntelMac, clean rebuild).

- viewstate_rag.rs's test module moves to persona/viewstate_rag/tests.rs
  (#![cfg(test)]): 1,458 -> 771 lines.
- viewstate_rag.rs:557's unwrap_or(Null) gets its reason on the line: an
  unstamped cursor is Null, never a fingerprint, so it is refused below by
  design (the comment above already said so; the ratchet reads the line).
- BASELINE_LINES_OVER 157,971 -> 157,645, measured on this tree.
source-hygiene 37/37. Not compiled here; CI compiles.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…(card a0790c4b)

#5015 merged list_fingerprint(&[String]) beside callers whose units had
meanwhile become Vec<RagRenderUnit>, so canary failed to compile (E0308 at
viewstate_rag.rs:475 and :555, CI job 118197821836; the only two errors in the
lib and lib-test build). The fingerprint now takes the units and hashes each
one's rendered content, the same bytes it hashed when units were strings, so
an offset's list identity is unchanged; metadata does not move an offset.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed 614bf8c. The fingerprint repair preserves the byte encoding for identical rendered content: each unit contributes its UTF-8 byte length in the existing usize big-endian encoding, then those content bytes, in list order. Metadata is excluded and does not change the content offsets. This is preservation of the existing encoding, not a new architecture-independent cursor format.

The test extraction previously compared equal ignoring line-edge whitespace. No source blocker found. Current merge CI has core tests, source hygiene, binding drift and standalone installer passing; Windows core compilation/custody is still pending. No live adoption claimed.

@joelteply
joelteply merged commit 719eed2 into canary Oct 19, 2026
8 checks passed
@joelteply
joelteply deleted the a0790c4b/canary-is-red-on-source-hygiene-5015-gre branch October 19, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant