Repository navigation
Adds core.checkpoint, the point of no return - #781
Merged
Merged
Conversation
A core block an author places: no slots, no config, the one outcome done, not itself a returnable step, entry 18 of the Structure group. It compiles to the step that does nothing, and the trail pass puts a clear of its scope's trail first in its state's onentry, only where that scope has a returnable step. The core manifest gains its row, the shipped schema its definition and the icon set a flag glyph. Refs: sb-1otr
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 this adds
core.checkpoint, the core block an author places as a point of no return (ADR-0002, Amendment of 2026-11-20,C12d), and its trail clear (ADR-0004, Amendment of 2026-11-20,L6). The design was ruled by the operator, 2026-11-19: "A core block (working name core.checkpoint) the author places; passing it clears the trail; sub-path boundaries, loop iterations and parallel lanes also count", and "No switch: Back exists exactly where a returnable step exists; upgrading moves no hash; a host opts in by declaring its type returnable, and those documents move once".StatifierBlocks.Core.Checkpoint): asC12dgives it, no slots, no config, the defaultdoneoutcome, noreturnable?/1, the injectedio/1of%{}, version 1, entry 18 of the"Structure"group labelled "Checkpoint". Its description,explain/0andsentence/1("No going back past this point") are new prose, kind-neutral.emit/2is the step that does nothing (D5), the same emission ascore.placeholder.Palette.core_types/0gains"core.checkpoint", soPalette.manifest/1ofcore/0gains{"core.checkpoint", 1}.StatifierBlocks.Compiler.Trailtreats the checkpoint as a boundary whose state's entry alone clears the trail of the scope it belongs to (the document, acore.foreachbody or acore.parallellane), first in its<onentry>, owned by the checkpoint block under the role:trail. A scope with no returnable step gets no clear, so a checkpoint there compiles to the placeholder's bytes (L8). The module, not the type name, is what is matched, so a host's other name for the module clears as well.palette_entry/0like every Structure type; it is the group's last row, with a newflagglyph in the shipped default icon set, and it carries no "Returnable step" marker.StatifierBlocks.Mapis specific to it.Hashes and bytes
palette_hashcovers only the entries a compile resolved (StatifierBlocks.Compiler,defp palette_hash/1), so it moves only for a document that uses the block.priv/schemas/block-document.schema.json) gains acore.checkpointdefinition, whichschema_drift_test.exsrequires for every core type.Provenance
Forced edits the file map did not name, each required by adding a core type: the shipped schema definition; the counts pinned in the palette browser, armed palette, icon set, view model, manifest, core types and signup wizard tests; the
Palettemoduledoc's "Ordering a group" paragraph (now 0 through 18, next 19); theCoremoduledoc's table and itsio/1paragraph; the icon set moduledoc's glyph count. Theflagglyph is new: every other Structure entry but the placeholder declares an icon, and none of the existing glyphs reads as a point of no return.Tests and sabotage
New:
test/statifier_blocks/core/checkpoint_test.exs(the declarations), checkpoint tests intrail_test.exs(the clear's bytes, entry only, Back after it, provenance, the no-step case equal to the placeholder, no trail created by placing one, inside a loop body, inside a parallel lane, a host's other name), the checkpoint's palette row inpalette_body_test.exsand its Map box inmap_test.exs. Every new test carries a one-line sabotage note; each mutation was applied, turned the named test red on an assertion, and was reverted from a copy.Review
Gate tier for the code; the in-turn review ran a diff critic and a test critic before this request opened. Accepted and fixed: tests for a checkpoint inside a loop body and a parallel lane, and for a host's other name for the module; a helper comment moved back to its function;
Code.ensure_loaded!/1before thefunction_exported?/3refutes; word boundaries in the explain guard.The gate (
mix quality) is green on this commit.