Specify 0.3.0-rc.5: concurrent edits, reported validity, regex profile - #61
Merged
Merged
Conversation
Validity is reported, never guaranteed: checks fall into request and safety, single-record, and cross-record tiers, and cross-record checks never block a write made through an engine. - collection.merge declares conflict, max, min, or union per top-level field, with max for lifecycle now/today fields and union for tags and uniqueItems arrays by default. - Update accepts add and remove list operations. - collection.unique gains enforce: write | report (default report) and exact governed-record and comparison-set scope semantics. - Paths are equivalent under NFC plus full case folding, with a deterministic ' (n)' suffix for derived and concurrent collisions. - A time-dependent or cross-record match.expr loads with a nondeterministic_match warning; it becomes an error in 0.3.0 stable. - Lifecycle has no sequence provider; CEL is the one expression language and Obsidian Bases expressions are an adapter dialect. - New chapter 12A defines record identity without in-file IDs, move detection, the three-way record merge with append-append body union, and the writer format fidelity rule. - settings.id_field has no default, path-pattern values may not contain '/', and ambiguous IDs resolve to null with ambiguous_link. - Chapter 13 lists the changes since rc.4 and how engines report the tightenings. - The v0.3 type-file schema gains collection.merge and unique[].enforce, and the claim schema gains the merge profile.
Regex: CEL matches(), JSON Schema pattern, and match.where matches share one flavor, the mdbase regex profile defined in chapter 10: RE2 syntax with ASCII-only \d, \w, \s, \b and case folding over Unicode scalar values, as in regex-lite. Unicode classes, backreferences, and look-around are invalid_pattern and make a type invalid. JSON Schema pattern following the profile instead of ECMA-262 is provisional. Body edits: update accepts body_edits, ranges whose offsets count Unicode scalar values of a base body identified by a SHA-256 body_base digest, with optional body_base_text. Edits apply directly to an unchanged body and otherwise rebase with the chapter 12A body merge; conflicts are found per line and fail with body_conflict, and a missing base fails with body_base_unavailable. They are exclusive with body and document and need no live-collaboration support.
New tests carry since: 0.3.0-rc.5 and changed tests carry changed: 0.3.0-rc.5. The manifest marks the rc.5 requirements and adds the merge profile and the merge and watch fixture sets. - merge/merge.yaml converts the 13 mdbase-next prototype merge fixtures into a merge_records format (base + first + second + type declarations -> exact merged bytes and conflicts) and adds 24 merge and strategy cases; merge/body-edits.yaml covers applying and rebasing body_edits. - core/paths.yaml, watch/move-detection.yaml, and cel/regex-profile.yaml cover path keys and suffixes, move pairing, and ASCII-versus-Unicode regex classes. - Adapter-target suites cover validation tiers, uniqueness modes and scope, non-blocking link checks, list operations, format fidelity, path collisions, body_edits through update, nondeterministic_match, and the id_field and ambiguous-ID rules. - links.duplicate_id_ambiguous now also expects ambiguous_link. - scripts/concurrent_edits_model.py is an executable model of the pure functions; check_v03_tests.py runs the 95 pure fixtures against it, validates the since/changed markers, and checks that the claim schema lists the manifest's profiles.
The rc.5 entry covers concurrent edits, reported validity, the regex profile, and body_edits, and folds in the changes made since rc.4 to YAML document records and Bases, seed type upgrades, and saved-view identification. The release notes list the behavior changes, the one existing test whose expectation changed and the new tests an rc.4 engine fails, the three choices decided for rc.5 (unsupported patterns invalidate the type, body-edit conflicts are per line, time-dependent match.expr becomes an error in 0.3.0 stable), and the remaining provisional choices.
Reconciles rc.5 with the open link PRs #49 and #51. - Chapter 08: the second tiebreaker counts path segments, and no tool may choose among duplicate filename matches by scan, index, or storage order. A tiebreaker-resolved link is not ambiguous. - Chapter 12: a rename with reference updating rewrites the links that resolved to the renamed record, including tiebreaker-selected filename matches, and never rewrites ambiguous links or links to other records. The result lists rewrites in references_updated. A rename keeps the record's identity, as a detected move does in Chapter 12A. - Chapter 14, Chapter 13, the changelog, and the release notes follow. - Conformance: links.filename_tiebreakers and core_write.rename_references, with four tiebreaker tests in core/link-ambiguity.yaml and four rename tests in the new core/rename-references.yaml (155 rc.5 tests in all).
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.
Specifies 0.3.0-rc.5. Collections keep
spec_version: "0.3.0". Most changes relax rc.4 rules; the few that tighten are reported as diagnostics rather than breaking compatibility.Full release notes:
docs/releases/0.3.0-rc.5.md. Chapter 13, "Changes Since rc.4", has the behaviour-change table and an engine checklist.What changes
Validity is reported, never guaranteed (00, 01, 04). Checks fall into three tiers:
error;validate_exists, link targets) are reported and never block.Concurrent edits (new chapter 12A):
collection.merge(conflict/max/min/union); defaults aremaxfor lifecyclenow/todayandunionfortagsanduniqueItemsarrays;Updates (12):
add/removelist operations;body_edits: text edits against a known base body, rebased with the 12A body merge;if_revisionis opt-in, and engines must never add it on a caller's behalf.Paths (02): NFC, full case folding, then NFC again, plus a deterministic
(n)collision rule. Path-pattern values containing/are rejected.Uniqueness (07):
unique.enforce: write | report, defaulting toreport, with realscopesemantics.One regex profile (06, 07, 10): RE2 syntax with
regex-litesemantics.\d,\w,\s,\band(?i)are ASCII-only.\p{…}make a type invalid (invalid_pattern).matches(), JSON Schemapatternandmatch.where.Determinism:
match.exprmust not depend on time or on other records. In rc.5 this is anondeterministic_matchwarning; it becomes an error in 0.3.0 stable.generated: sequencehas no v0.3 destination.Fixes for drift:
id_fieldhas no default;ambiguous_link, with no filename fallback.Deterministic link resolution and rename (08, 12):
references_updated.The earlier
Unreleasedentries ship in rc.5: YAML document records and Bases, seed type upgrades, and saved-view identification.Conformance
The v0.3 suite gains a
mergeprofile and amerge_recordsfixture format, documented intests/v0.3/README.md.since: 0.3.0-rc.5; changed tests carrychanged: 0.3.0-rc.5.scripts/concurrent_edits_model.pyis an executable model. CI runs 175 fixtures against it; 215 more need a real engine.links.duplicate_id_ambiguousnow also reportsambiguous_link. The release notes list every new test on which an rc.4 engine would diverge.Decided vs provisional
\p{…}makes a type invalid;body_editsconflicts are detected per line, and a finer granularity would be a compatible refinement;match.exprwarns now and becomes an error at stable.Related open PRs
Reconciled in e6fb2de. None of the other PRs was changed.
tests/level-5/references.yaml(v0.2) and has no textual overlap with Specify 0.3.0-rc.5: concurrent edits, reported validity, regex profile #61. Its rule is that a rename rewrites the link the tiebreakers selected, not every duplicate. Specify 0.3.0-rc.5: concurrent edits, reported validity, regex profile #61 now states that rule for v0.3 in Chapter 12, pins "shortest path" as fewest segments to match mdbase-rs, and addscore/rename-references.yamland the tiebreaker cases incore/link-ambiguity.yaml. Align rename references with deterministic resolution #51 merges cleanly before or after Specify 0.3.0-rc.5: concurrent edits, reported validity, regex profile #61. One caveat for Align rename references with deterministic resolution #51's own review: v0.2 §12 still says "if a link could refer to multiple files, don't update", which reads as contradicting its fixture unless "multiple" means "after tiebreakers".0.3.0-rc.5section, because rc.5 replaced## Unreleased. A local branch,reconcile/pr58-rc5, has Remove the saved-view source operations #58 rebased onto Specify 0.3.0-rc.5: concurrent edits, reported validity, regex profile #61 with the entry under a new## Unreleasedheading. It is not pushed, and the checks and the site build pass on it.Recommended merge order:
reconcile/pr58-rc5.Close #49.
Context
These semantics come from the mdbase-next redesign. Its feasibility prototype measured conflict rates of 0.08% of writes with field-level merging, against about 2% with whole-file revision checks.
How to review
Start with
docs/releases/0.3.0-rc.5.md, then12a-concurrent-edits.md, then chapter 13's "Changes Since rc.4". Checks:plus the site build.