Preserve current core, source, REST, desktop, recovery, documentation and validation work, including AGENTS.md and the development summary. This is a work-in-progress checkpoint: the new compact palette has outstanding compilation errors and native acceptance; earlier passing gates retain their documented scope.
5.3 KiB
Source-7 checkpoint compatibility
Focused Windows desktop tests pass: six source-7 recovery cases and thirteen legacy source-5 cases. Native source-7 recovery acceptance remains pending. Prior source-5→6 native evidence does not verify this new adapter.
The private checkpoint envelope remains version 1. Recovery accepts a migrated source-5/source-6 checkpoint only when the accepted bundle changes by exactly the entry header's version token. All module identities, comments, Unicode, CRLF and includes must otherwise match. It reconstructs the historical Project/Diagram serialization, admits it through the corresponding closed old JSON decoder, and requires full equality with the migrated project before trusting its historical FNV fingerprint. Source 5 requires default view options and omits that unavailable historical diagram field; source 6 preserves its selectors.
Frozen nonempty profile fixtures are in crates/oa-desktop/src/recovery/fixtures. They were generated and source/JSON-compared using a genuine schema-6 library; their independently calculated historical fingerprints are 31b56f1d17c2d9cf (5) and 88c1149e445e8676 (6). Both contain 30 source modules, Call/Reply values, SequenceLinks and more than 60 traces. Fixture README and profiles.json record exact SHA256 provenance. The generator refuses to run against a newer schema.
Only clean buffers exactly matching accepted legacy source are refreshed. Dirty or unrelated buffers, unfinished paths, invalid property strings and behavior inputs remain authored data. Workflow/semantic drafts require the exact historical base, then replan against the upgraded accepted project and discard old impact approvals. Structural source-7 fields (including explicit null/default operation intent, disabled operation cache, contextual drafts, omission decisions and new semantic facets) are refused in old-version draft envelopes; text strings are never searched for these words. Refusal preserves the original checkpoint bytes. A current source-7 checkpoint can retain both a qualified contextual draft and an unresolved operation property draft without executing either.
No periodic full migration/restore is added: the historical shape/fingerprint proof runs only during explicit recovery. Recovery changes no original model, hosted resource or checkpoint file. The recovered document is dirty, detached for explicit Save as, and has no persisted undo stack. The recovery status reports the actual from/to versions.
Focused validation used the normal one-job user-local Windows Rust1.98.1 gnullvm toolchain against the frozen integrated desktop/core tree:
cargo test --locked -p oa-desktop recovery::source7_tests -- --nocapture: 6/6 pass; compile 28.35s, tests 8.02s. Log.local/source7-recovery-focused2.log.cargo test --locked -p oa-desktop source5 -- --nocapture: 13/13 pass, tests 0.59s; includes the semantic v1/v2 attachment legacy adapter. Log.local/source7-source5-recovery-focused.log.
The first run compiled cleanly and passed five cases; the combined-draft fixture incorrectly named the lesson's Activity instead of its actual owning Process. Changing that test alias to oa_response corrected the fixture. Production code required no runtime correction. Old authored inputs stayed unchanged; only current-output expectations advanced. The per-row semantic operation-omission raw field is default-None on current recovery, is preserved/replanned, and is refused when explicitly present in a legacy envelope.
These are focused Windows test results, not a full desktop regression run, Linux/MSRV build, or native source-7 recovery acceptance. Those remain separate gates. Cargo ownership was explicitly returned to root after both filters completed.
Follow-up closed-envelope audit
Independent review found that the initial recovery guard missed the new view enum Relation(ContextualLink), the workflow relation-kind string ContextualLink, the topology tool string Contextual, and inactive property-cache addresses containing new structural paths. Accepted old source/fingerprints still passed, allowing current raw-draft deserialization to interpret impossible historical intent. This did not execute drafts or alter accepted models, but contradicted the closed historical payload contract.
The bounded correction checks exact structural tags, input-map keys, and constructor-cache tuple addresses/cached-input keys. It never searches authored names, source, expressions or raw input values. Two new checkpoint regressions exercise an old6 Diagram selector and inactive cached contextual-purpose path: current draft restoration accepts the payload, legacy checkpoint restoration must refuse it while preserving its exact disk bytes, and otherwise identical ordinary prose containing the same words/paths must restore. All eight source7 recovery cases passed in .local/source7-desktop-final-focused.log and again in the complete561/561 desktop run .local/source7-desktop-full-tests2.log. Native recovery remains a separate gate.
A suggested analogous core semantic-baseline string-tag hole was refuted: persisted baselines contain FacetReview tagged payloads, whose new keys are already rejected. FacetSelector string leaves occur in requests/private drafts; they are not valid baseline records. Core separately rejects the diagram's new relation-kind tag before legacy defaults.