Repository navigation
Z projection 2/6: conversion record version 3 (part of #176) - #212
Merged
Merged
Conversation
Record-level projection, the entry action "projected" and a strictly read per-entry projection object (new pure module projection_record.py); the projection is part of the reuse key; version 2 records are still read. Contract section 17 and plan question 77. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
This was referenced Nov 8, 2026
guijacquemet
pushed a commit
that referenced
this pull request
Nov 8, 2026
Question 77 is taken on main by the Z-projection decision (#212). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #211 (base is
claude/z-projection-core, so the diff shows only this PR; GitHub retargets it tomainwhen #211 is merged and its branch deleted).What changed
Second PR of the plan for #176 (design: MorphoFeature
docs/restart/designs/pp176-z-projection-design-2026-11-07.md; owner answers of 2026-11-07). The conversion record learns to hold a projection. Nothing writes one yet.RECORD_VERSION = "3". New record-levelprojection(null, or{method, z_range}), the entry actionprojected, and a per-entryprojectionobject (new pure moduleprojection_record.py,ProjectionEntry):source_relative_path,source_content_sha256,source_z_axis({letter, index}or null),source_z_size,z_range(slices actually used),method,source_dtype,output_dtype,dtype_rule,rounding,nan_policy(propagate),dropped_sizes({"Z": {value, unit, source} | null}),significant_bits_dropped.copiedentry). A version 2 record may not hold a projection field.CopyEntry.same_plannow includes the projection (everything except the source content SHA-256, which the write computes), so another method or range into the same tree iscopy_differsonce the writer exists, and an identical rerun reuses.!=). Every new record is version 3,projection: nullwhen nothing was projected.Regression test
tests/test_projection_record.py(33 tests): v3 round trip; a tree without a projection is version 3 withnull; a version 2 record is still read; a version 2 record cannot hold a projection; versions 1, 4 and missing are refused; every field of the projection changes the reuse key and the content SHA-256 does not; 20 contradiction cases are refused (missing or extra keys, wrong method or rounding, range outside the stack, output type not the table's, sum that could not be exact, and so on).tests/test_convert_integrity.pynow expects record version"3".ImportError: cannot import name 'PROJECTED' from 'morphobricks_preprocessing.conversion_record'(1 error, 0 tests run).Checks
python tools/check.py: Ruff, formatting and code rules clean;4284 passed, 4 skipped, 2 warnings. The base (#211) gives4251 passed, 4 skipped, 2 warnings; the difference is the 33 new tests. The 4 skips are the pre-existing ones (case-insensitive file system x3, file modes x1).Series: 1 pure module (#211), 2 record v3 (this PR), 3 plan and write, 4 CLI, 5 run side, 6 notebook card.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm