From 13f7e6b0d115aa676bc8ac70ec06f38314536f0b Mon Sep 17 00:00:00 2001 From: "sorokin.oleg.edu" Date: Sat, 12 Sep 2026 22:00:33 -0700 Subject: [PATCH] Record analysis and Scenario version integration requirements --- .gitattributes | 2 + harness/DECISIONS.md | 16 ++ ...s-version-integration-inputs-20260913.json | 161 ++++++++++++++++++ ...sis-version-integration-review-20260913.md | 45 +++++ 4 files changed, 224 insertions(+) create mode 100644 harness/scenario-analysis-version-integration-inputs-20260913.json create mode 100644 harness/scenario-analysis-version-integration-review-20260913.md diff --git a/.gitattributes b/.gitattributes index 81e669f5..dcc341eb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -83,3 +83,5 @@ harness/experiments/navigation-palette-e124029-windows-20260913/** -text whitesp harness/experiments/navigation-native-preparation-e124029-20260913/** -text whitespace=-blank-at-eol,-blank-at-eof,cr-at-eol harness/experiments/analysis-source-s0-s1-windows-20260913/** -text whitespace=-blank-at-eol,-blank-at-eof,cr-at-eol harness/experiments/analysis-source3-bridge-windows-20260913/** -text whitespace=-blank-at-eol,-blank-at-eof,cr-at-eol +harness/scenario-analysis-version-integration-review-20260913.md -text whitespace=cr-at-eol +harness/scenario-analysis-version-integration-inputs-20260913.json -text whitespace=cr-at-eol diff --git a/harness/DECISIONS.md b/harness/DECISIONS.md index 23482909..c0128fb8 100644 --- a/harness/DECISIONS.md +++ b/harness/DECISIONS.md @@ -426,3 +426,19 @@ that has not found a feasible candidate. Pure inverse-geometry experiments and native port/handle arbitration remain prerequisites for accepting production interaction. Process/scenario authored layouts retain their separate persistence dependency; the persisted-rectangle slice does not complete that broader need. + +## Pending analysis/Scenario version composition — 2026-09-13 + +The isolated schema8 analysis and Scenario layout contributions must share explicit +version and resource boundaries before adoption. The [source audit](scenario-analysis-version-integration-review-20260913.md) +pins analysis6216cff and Scenarioaed07176; it does not establish combined execution. +Older JSON/source versions must reject the new Diagram layout field by presence, +including null, while retaining legal schema7 fields. Typed migration entrances +must also reject a current-only payload rather than discard it. Count all stored +layout rows and explicit address references together with existing model/analysis +usage; visibility does not exempt stored data. Run both analysis and Scenario +remap collision checks before any identity/reference mutation. Preserve distinct +Scenario row, global definition, scoped parameter and call-site edit identities. +The audit specifies failure cases and compatible implementation seams. Public +source8, resource calibration, combined save/reopen and interaction acceptance +remain separate requirements; neither isolated suite establishes their completion. diff --git a/harness/scenario-analysis-version-integration-inputs-20260913.json b/harness/scenario-analysis-version-integration-inputs-20260913.json new file mode 100644 index 00000000..832f31ee --- /dev/null +++ b/harness/scenario-analysis-version-integration-inputs-20260913.json @@ -0,0 +1,161 @@ +{ + "analysis_pin": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "scenario_pin": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "source_inspection_only": true, + "files": [ + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/model.rs", + "git_blob": "a81221a75d982a08ea7aeb2bb8108e863a55e642", + "bytes": 67308, + "sha256": "5c131bcade2618f858f66f39b95aceb2c6aee6ec7ea827fa575d472938116f5d" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/scenario_layout.rs", + "git_blob": "89ce02ae264822543f3f14c87941d389a33f200c", + "bytes": 14290, + "sha256": "1cf56f501b09f099a36b476a01aee6a27ad139e884b23b253af66f39798b8767" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/scenario_layout/tests.rs", + "git_blob": "5cb61cdd104a0f76e2c9cb663bfe17e8e41bde43", + "bytes": 23502, + "sha256": "f01523fc9b7356886a59d50e1b968d1d22addab5cd8a2f86a182db86bb4c495f" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/scenario_layout/tests/source_lifecycle.rs", + "git_blob": "a5411ec75c3cda1d991aeff34e16605e2ccdaba0", + "bytes": 9726, + "sha256": "df99d96db6e1fe550e01950a27f9a8bfdeaac92d726168d27191ae03bd441e00" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/language.rs", + "git_blob": "cafeb5e646059b04d36325940cbfba8686aca9bc", + "bytes": 105326, + "sha256": "b8e25edc671e6a66ca6dbc476ef5d6f82e2784f7fb4a3b91cabde0af51a6be03" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/references.rs", + "git_blob": "05eca61d51a34cc6e05f849adec4ace11b627e98", + "bytes": 24454, + "sha256": "b6d2c388815c51469dd73eb62628c77ea6d95d20324c83e184b2b9f896aa8a4a" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/session.rs", + "git_blob": "c9f65c7dccd748a197e1024cfd73b8fbe8456a92", + "bytes": 36873, + "sha256": "8a54b3f8841edb894a9d250be6e95b280cc87a7af2fe43005d298a717b1cba65" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/source_project.rs", + "git_blob": "8db86bd538754f2a20a4c68c746b9e5652eee5a8", + "bytes": 65161, + "sha256": "523f2c12d76eae818824263f667acc766dd178a023abf1f0833a95d62a88ce0b" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/source_project/source_migration.rs", + "git_blob": "dc8243b90c309b8b7db5407e1643f8d807da8311", + "bytes": 4880, + "sha256": "3c563ed7826912f518424401f1bc2922e6cf8b63f0079666d0e20b2423c0da2e" + }, + { + "revision": "aed07176ab453b981d5f9c76e504c531f6dd7f42", + "path": "crates/oa-core/src/validation.rs", + "git_blob": "a8b0f76c796555e3ca8d7e73e220548256fafda2", + "bytes": 112858, + "sha256": "2f8b7572a3d987f42e6f2431261c4b207ef319dbac6370072328e091d74df8f9" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/model.rs", + "git_blob": "44fe23f8509a5af01e81a7f261ef7d63f4189a6c", + "bytes": 68092, + "sha256": "1c06bcc4aa7abfef89876c3a001171c742558d664612cf36152ac0aa52bc7baf" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/language.rs", + "git_blob": "1b48474e2440bd3d3f2d4d00af8d961daeeb6252", + "bytes": 100444, + "sha256": "806dc09bf643c2bce867afccad1b890e28718f5fae15fea883126458623d9c17" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/language/source3_bridge.rs", + "git_blob": "65127f421cc330c77590b4fd0e1532b8f1936d3d", + "bytes": 1593, + "sha256": "e3a76cfdacf6d85ce3086dc9031aeab5115496786ddf197510939ac0e0c5310c" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/migration_v3/mod.rs", + "git_blob": "2d1ef1060e16d84b04401b4bc909d023643155ef", + "bytes": 23023, + "sha256": "f4edb6a0b50ecfe8670973776d703047b064420cb1f05913129c00fc656b3722" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/migration_v4.rs", + "git_blob": "56be3297a919386ff449e4d7d2b98e2f74a29ef0", + "bytes": 4062, + "sha256": "bf4056da11ac4f27627320742539cc2408ed42334106f3068c432ff70c62db25" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/migration_v7.rs", + "git_blob": "90c44bdf933c5a15bd1809eb0ba8ecc92520508b", + "bytes": 2097, + "sha256": "474f4cebdd343a7eecdf243149bbcbf08e12eaa05b8532bf2593705287017b30" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/persistence.rs", + "git_blob": "e7bc3f0b1ae518d2b730b5cbe4791fc690cbb840", + "bytes": 35492, + "sha256": "d7b33495e429a0bff65782be4f5295f8fedbd4f72ec394250919bb80ccf79d9e" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/persistence/json_codec.rs", + "git_blob": "ff6c72831846b209b3c8600b447e335f68266d2d", + "bytes": 14642, + "sha256": "2aa2c52eea794acb85744440192df9ef5193160ad6ebd1febaa824e144aadd90" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/references.rs", + "git_blob": "df7a3e0c30e0c37a026f29ad9fa0b311ebc5cea6", + "bytes": 22840, + "sha256": "63cd8655f67d919cc8f6b796f4cec42d7b020aa37880e50f19190aab8b0029a3" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/session.rs", + "git_blob": "eef711ea26d839c77f1da87f81a9aa5ad9e82902", + "bytes": 38211, + "sha256": "06115011bc86f0c95bbbe6d14bdaedd7b83a66c0104db186900b0f047b0f9c43" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/analysis/references.rs", + "git_blob": "0f7836fe1f52d7fbbbce00da74c46ad6e2374341", + "bytes": 8757, + "sha256": "fe50edc049b9900d91cade3f58d15aca4101211c39bb090317f548259d634529" + }, + { + "revision": "6216cff4cfeb1502b8453b40547aacb74941f2b2", + "path": "crates/oa-core/src/source_project.rs", + "git_blob": "4d3e377f616154aae32bcaf85aaf1f284e137388", + "bytes": 61843, + "sha256": "1394370bcc5908873b830c2c11312e6e1611af41f46c4f43ca0a6bcb713bb466" + } + ] +} diff --git a/harness/scenario-analysis-version-integration-review-20260913.md b/harness/scenario-analysis-version-integration-review-20260913.md new file mode 100644 index 00000000..0cc56548 --- /dev/null +++ b/harness/scenario-analysis-version-integration-review-20260913.md @@ -0,0 +1,45 @@ +# Scenario / analysis schema8 integration audit + +**Decision boundary:** optional Scenario presentation can share the pending schema8 model, but `aed07176` is not a version-adoption patch. Four integration obligations remain: old-schema field-presence rejection, combined resource accounting, atomic composition of reference preflights, and preservation of typed source-update contexts. They are root codec/integration work, not defects claimed against the peer's explicitly isolated contribution. Do not implement them in the frozen S2 worktree before the typed-adapter phase handoff. + +Inspected exact Scenario source `aed07176ab453b981d5f9c76e504c531f6dd7f42` and clean analysis worktree `6216cff4cfeb1502b8453b40547aacb74941f2b2`. The Scenario object was missing locally; a scoped `git fetch --no-tags --no-write-fetch-head gitea ` populated objects without changing the root checkout/branch or frozen worktree. [Input manifest](scenario-analysis-version-integration-inputs-20260913.json), SHA256 `c72d6d140579dcbf910f81505ced83a3cd6fa09bae813469be59da635033cbb2`, pins 22 actual source blobs. Accepted r2 typed-definition grammar was read from the analysis worktree's `harness/analysis-source8-20260913/analysis-source8-repair-design-r2-20260913.md`. + +Read Gitea #7 through [843](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/7#issuecomment-843), #20 through [845](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/20#issuecomment-845), and the [published aed gate README at e7ceff11](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/e7ceff11afb85f5e944fa3a818acc04e464af2d3/harness/experiments/scenario-core-gates-20260913/README.md). It records 26 focused cases overlapping 471 executed core passes, one ignored probe, strict pass and preserved earlier failures. This audit did not rerun/independently validate those receipts. A newer renderer candidate68a81c3 is reported in845, but its source/runtime is outside this aed codec audit. No gesture/rendering import is proposed. + +## Exact seams and mandatory failure cases + +**1. Freeze old Diagram contracts before adopting the new current field.** Peer `model.rs:1523` adds `layout: Option` with serde-default None and omitted serialization of None. `scenario_layout.rs:10-35` defines Scenario payload, lane rows and message rows; message addresses retain explicit reference paths. None and Some(empty) intentionally differ. Analysis is schema8; the peer stays schema7 experimentally. Keep root's version decision; do not import the peer's SCHEMA_VERSION=7 over analysis. + +Analysis `migration_v7.rs:10-25` freezes only the top-level Project envelope and reuses current Diagram. `migration_v3/mod.rs:23` and `migration_v4.rs:59` also share Diagram. Adding a current field therefore makes typed older envelopes accept it unless separately rejected. Existing `persistence.rs:163-166` inspects raw JSON only for versions<=6, and `check_legacy_header:225` catches unknown Diagram fields only for pre6. Neither protects schema7; schema6 also lacks a layout-presence check. The actual JSON boundary has no version-aware nested Diagram visitor: json_codec.rs:276-297 delegates current decoding to Project::deserialize and legacy decoding to generic serde_json::from_slice::; the derived current Diagram accepts its newly known layout field even when the frozen top-level DTO denies unknown fields. `reject_pre8_project:479` currently checks definitions/analysis kinds only. Testing `layout.is_some()` after serde is inadequate: explicit old `layout:null` has already become None. + +Minimal compatible repair: a context-specific raw Diagram-field presence rejection (at diagrams..layout, not a recursive blacklist for every key named layout) for schemas<8 before deserializing current Diagram, and a corresponding source check in `language.rs:1757` **before** defaults/merge/from_value. Reject explicit `layout` even null/none/empty payload. Do not simply extend the existing call to `check_legacy_header` to version7: it unconditionally invokes `reject_source7_fields`, which would wrongly reject legitimate schema7 Operation/contextual-link fields. Keep the <=6 source7 restriction separate from the new <=7 layout restriction. Frozen nested Diagram DTOs are a stronger alternative, but require more migration adapters; either approach must retain old field-presence semantics. + +Also protect typed internal migration entrances: `reject_pre8_project` should reject any non-None current layout, and `language/source3_bridge.rs:13-47` must not blindly forward a scratch Diagram carrying a new payload. Its exhaustive Project destructure does not detect additions inside the shared Diagram type. Never strip a supplied payload or serialize a current record back into an older contract as a workaround. + +Required public negative matrix: real legal schema3/4/5/6/7 projects with one diagram, inject `layout:null`, empty Scenario, and nonempty Scenario; all reject without writes. Source6/7 `layout none;` and `layout { Scenario { lanes []; messages []; }; };` must reject, including included modules. Keep legal schema7 Operation/contextual-link positives to catch overbroad rejection. Legitimate old payloads without layout migrate to current None and an empty analysis catalog, with exact semantic IDs/geometry retained. Current schema8 absent/None/Some(empty)/sparse layout round trips must preserve their intended distinctions. Standalone `serde_json::` success is not public version admission. + +**2. Wire both semantic row and ordered-reference accounting.** Peer `scenario_layout.rs:61` deliberately exposes only a contribution: `None=0`, `Some=1 + lanes.len + messages.len`, no graph objects. Its `reference_visitor_and_record_count_cover_explicit_rows` test proves 0 and3 for one lane/one message, not integration into public limits. Analysis `language.rs:62-108` currently counts graph+definitions, ordinary diagrams/nodes/routes/anchors and `analysis::nested_record_count`, but never Scenario payloads. Add every diagram's contribution using bounded/saturating accumulation; do not replace the existing analysis contribution or count only the active view. Hidden/filtered/inactive diagrams and structurally invalid or disabled-looking payloads still consume stored-record/reference budgets; visibility and renderer support are not admission exemptions. + +The variable-length `message.address.references` is a separate ordered-reference budget hook. Count its actual length across **all** rows/diagrams together with existing element steps and ContextualLink endpoint paths, including malformed/unsupported candidates. Peer `scenario_layout.rs:226` rejects nonempty paths semantically, but that is not a resource meter. It still receives already allocated vectors. Lane/occurrence singleton references are bounded by row counts; this does not require redefining the existing budget as every global reference. + +Retain JSON physical preflight (`persistence/json_codec.rs:87`, byte/token/aggregate-entry/container/string ceilings) before serde and final `ParseLimits::check_model` before structural validation (`persistence.rs:213`). Source `language.rs:1544` and bundle `source_project.rs:503` currently meter declaration counts, not these nested rows. The root typed-source resource phase must charge layout rows/reference entries under the **same whole-document/bundle** budget before potentially large collection/resolution work; do not reset per included file, diagram or list and do not route Scenario coordinates through Exact/analysis-expression node accounting. Do not turn on DEPTH_128_VALIDATED (`json_codec.rs:22`) for this shallow optional payload. + +Minimal failures: budget B accepts exact combined ordinary+analysis+Scenario count, B-1 rejects; two views in different includes exceed a shared limit though each fits; Some(empty) consumes its payload record; a single rejected message with an oversized explicit reference path is charged; existing ContextualLink paths plus Scenario paths share the ordered-reference ceiling. Exercise public JSON/source and programmatic Session/prepare boundaries, with a no-mutation sentinel. Physical preflight alone does not prove the configured semantic max_records limit. + +**3. Compose both fallible remap domains before any identity/reference mutation.** Peer `references.rs:207-323` adds diagram visitors, Scenario projection owner remapping and affected-row collision preflight; `session.rs:917` runs it before reidentifying. Analysis already has a different preflight at `references.rs:214-217` and `session.rs:941`, plus `analysis::references::remap_project`, definitions and scoped ParameterIds. A blind replacement would lose one domain. Worse, adding peer checks only inside the final remap call lets root `session::reidentify` change object identity before a Scenario collision rejects. + +Use one composed check entry point called before mutation by both public `references::remap_references` and `session::reidentify`; it must run analysis key/call-map checks and Scenario lane/address collision checks first. Then retain typed analysis remapping and peer diagram visitor/deletion pruning, including Scenario owner-view cascade. Parameter IDs remain scoped: a ParameterId equal to the remapped global UUID must not be rewritten merely by equality. Preserve the peer's repair-batch tolerance: unrelated already-invalid duplicate rows do not become a new global admission requirement for an unaffected remap. + +Required union negatives/positives: direct public remap and Reidentify each leave the complete Project unchanged on a Scenario lane/message collision; analysis override/call-argument collision remains atomic with Scenario present; successful remap updates layout/Scenario owner/global analysis subject refs while preserving equal-valued scoped ParameterIds; delete only the actual closure, retaining unrelated view overrides and incomplete-message positions. These are additional union tests, not a replacement for the peer's26 cases or root analysis tests. + +**4. Preserve source8 typed field dispatch and peer row provenance.** Peer `source_project.rs:1136-1154` adds explicit EditContext path `Diagram -> layout -> Scenario -> lanes/messages`; `:1544-1594` uses lifeline identity or full occurrence-address identity only in that context. This must compose with the root's future typed definition/parameter/call-site/override paths, not become a generic field-name heuristic. A calculation parameter or ordinary record named `messages`, `lanes`, `layout`, etc. must not acquire Scenario row identity. Diagram coordinates remain the existing finite f32 numeric grammar; new analysis literals/operators must not silently broaden it to expressions/ratios. + +Retain context arguments at both update entry (`peer source_project.rs:934`) and migration entry (`peer source_project/source_migration.rs:72`); the first omitted migration argument caused a real retained compile failure. Keep the peer's authored `layout none` preservation rule (`source_project.rs:1346`) for an unrelated edit, while a real Some->None clear removes payload syntax. Retain current `SourceIndex` declaration/top-level field meanings and the root's distinct Definition record category; no Scenario data should be classified as a new global definition or graph object. + +Reuse peer `scenario_layout/tests/source_lifecycle.rs` controls for reordered rows with identity-following comments, untouched 4.20e2/2.00e2 spellings, alias changes, identity swaps, one-Undo command batches, explicit none, clear, invalid-source nonmutation and unchanged file ownership. Add one mixed schema8 bundle with neutral definitions + analysis Expr/call parameters + Scenario layout: alias/parameter rename affects only typed uses, row reordering leaves analysis source byte-exact, analysis edits leave layout/comment/number spelling byte-exact, and full Project equals recompiled source. Old source migration must retain includes/trivia, never synthesize authored layout; current canonical/source updates must publicly reopen exactly before checked save may stage/replace. + +## Ownership / order + +Root owns public version8 adoption, older wire/source rejection, shared counts/resource policy, source8 typed-adapter composition and save-before-replace safety. The peer owns `scenario_layout` semantics, sparse commands, scoped source-row provenance and renderer/gesture progress. Import reviewed peer mechanisms after the S2 declaration/lowering boundaries stabilize; compose shared `model/language/source_project/references/session/persistence` changes deliberately. No change to peer gesture policy, automatic fallback policy, activation rendering or new schema number is needed for these codec hooks. + +The original checked-save regression must remain red until public source8 is complete; keep the S0 public-decode/full-equality guard. Peer source7 experimental tests should be ported to the final current schema fixtures at integration, while explicit old-schema layout tests remain negative. Passing either isolated suite does not waive combined admission, native or API lifecycle gates. This audit changed no production source, ran no compiler/GUI and posted nothing to Gitea.