Repository navigation
Draft description, proposed IDs and legacy design migration (Stage 1, PR 7) - #191
Merged
Merged
Conversation
…Stage 1, PR 7) Folder labels are proposed as condition, technical-repeat and repeat IDs, and raw header names as channel IDs, only when the reader would accept them as written; otherwise there is no proposal and nothing is repaired. A draft keeps IDs proposed until confirmed and lists its open questions. migrate_legacy_design reads experiment_design.csv strictly and carries repeat groups, the latest confirmed_on (with a note of the original dates) and the control rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
…c 4.6a) Owner decision of 2026-11-07: migrate_legacy_design no longer refuses a repeat_group such as z; it migrates with no proposed repeat ID and an open question, so the user names the repeat. Nothing is repaired or derived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm # Conflicts: # pyproject.toml
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.
What
Stage 1 design PR 7 (conformance P30 and the proposal part of P32). Additive: no run, notebook or CLI command uses it yet, and nothing is written to disk.
draft_ids: a folder label is proposed as a condition, technical-repeat or repeat ID only when the reader would accept it as written (Spec 4.6a, extended to repeat IDs as in Q6).control,files,zand the like get no proposal. Nothing is trimmed, re-cased, numbered, derived or renamed. The rules applied are the reader's own (description_identity,description_rules), with no second copy. A raw header name is proposed as a channel ID only if it is a valid ID as it stands (Q4).R,GandBare never proposed, and names equal ignoring case within one layout get no proposal.draft:draft_from_discoveryandDraft. IDs stay proposed untilconfirm_id. Open questions are listed, and a draft is notpublishablewhile any is open.unit_rows()givescondition_id,repeat_groupandtechnical_repeat_idbeside the unchanged source labels (Q8). The draft is not a description and writes no file.migrate_legacy_design: readsexperiment_design.csvstrictly, soyes,noand empty are refused.repeat_groupis carried as the proposed repeat ID. A group with severalconfirmed_ondates takes the latest, and a note lists each folder's date (never the clock). A confirmed group with no date stays open. 0, 1 or 2+ marked controls give no reference, one reference per other condition, or an open question. A design that breaks a Spec rule is refused with the reader's code (found by running the reader's own phases on a probe document, for exampleE_REPEAT_ID_SHADOWS_SOURCE). A legacy condition such ascontrolmigrates with no proposed ID and is not refused. New folders are pending and reopen their group. Missing legacy folders block publication.repeat_groupthat is not an allowed repeat ID (for examplez,files,overrides) is not refused. It migrates with no proposed repeat ID and an openid_pendingquestion, so the user names the repeat. Nothing is repaired or derived, the legacy confirmation and date are kept, andconfirm_idstill refuses the forbidden value unchanged (E_FORBIDDEN_FIELD). In the rule-check probe the repeat now gets a stand-in ID like conditions and technical repeats do. This replaces the earlier "refused withE_FORBIDDEN_FIELD" behaviour (commit 2 of this branch).design._parse_strictis renamedparse_design_bytes(public, same behaviour).Not decided (skipped)
control,files) the Spec says preprocessing proposes "a different ID that is allowed", but gives no rule for making one. Deriving one would be a repair, so there is no proposal. The user names the ID. P32's "nevercontrol,files,overrides" holds. The derived CSV part of P32 is PR 10.propose_channel_idstakes the names as input and is tested alone.Part of the Stage 1 design (PR 7). Main was merged into the branch (CHANGELOG and AGENTS.md conflicts resolved by keeping both entries).
Tests
tests/test_draft.py, 35 tests. Onorigin/mainthe file fails at collection (ModuleNotFoundError: morphobricks_preprocessing.draft). Regression for the owner decision:test_a_legacy_repeat_group_that_is_not_an_allowed_id_opens_a_question[z|files|overrides]. On the previous branch tip (source reverted) it fails for all three withLegacyMigrationRefused ... (E_FORBIDDEN_FIELD); on this branch: 35 passed.python tools/check.pyafter merging current main: 3879 passed, 4 skipped, code rules clean. The 4 skips are environment ones (case-insensitive file system and file-mode tests, unrelated to this change).Generated by Claude Code