Files
ARCADIA-Studio/harness/experiments/analysis-source3-bridge-windows-20260913/evidence/.local/analysis-source3-bridge-implementation-review-20260913.md
T

6.0 KiB
Raw Blame History

Source3 bridge implementation review

2026-09-13. Reviewer Codex-956atf /root/source8_syntax_review, GPT-6 Astra. Read-only source review of .local/a3-bridge-20260913, branch codex/analysis-source3-bridge-956atf, base 2c515cf3bdb3f707beee320be8fed90cffb40757 plus the uncommitted bridge delta. Read applicable AGENTS.md and the two language.rs hunks, new bridge and four tests. No compiler, test execution, source edit, GUI or Gitea operation. Root owns correction and integration.

Reviewed initial bytes (SHA256): language.rs 806dc09bf643c2bce867afccad1b890e28718f5fae15fea883126458623d9c17; language/source3_bridge.rs e3a76cfdacf6d85ce3086dc9031aeab5115496786ddf197510939ac0e0c5310c; language/source3_bridge/tests.rs e649dcae26873091ff6378d14a36e876e6333bf0d5674915ee2682445c125a6f. git diff --check produced no errors. Findings below refer to these bytes, even if the root fixes them during review.

Finding requiring correction before the test gate

P2 — Reserved alias makes the independent prose fixture invalid and blocks two new tests. source3_bridge/tests.rs:10 declares oa_activity activity, line13 references @activity, and prose_json() gives the OA record alias activity. model.rs:1702–1738::reserved_alias explicitly reserves activity. language.rs:1225–1232::identifier rejects this declaration with Invalid or reserved alias 'activity'.; public JSON decoding reaches validation.rs:222 and rejects the same alias. Therefore old_review_prose_survives_without_admitting_semantic_fields fails at its initial positive-control unwrap, and scratch_bridge_refuses_to_discard_current_only_data fails when it decodes prose_json before reaching the current-element/semantic-content guards. The malformed semantic examples would also be masked by the earlier alias error if those positive unwraps were removed.

Fix: use an allowed alias such as reviewed_activity in both independent fixtures and the source trace reference; retain the UUID, display name, typed body and baseline prose. Do not relax reserved_alias or parser/validation checks. After correction, run all four bridge tests under the parent's compiler lease. The existing independent fixture construction is otherwise appropriate.

Reviewed behavior without another source finding

  • source3_bridge.rs:13–49 exhaustively destructures Project without .., validates version3, refuses nonempty definitions/current elements, and constructs the actual closed Project3 envelope. Every remaining field is moved or converted through its existing nested frozen contract. No definition is removed from external JSON, no frozen DTO changes, and no public source8/version-policy change is present.
  • Existing legacy_elements remain authoritative for source3 bodies. Relations still undergo a complete conversion to Relation3; old constructor validation remains in v3::migrate. Traces retain strict Trace4 decoding, so Some semantic history cannot disappear through a lossy reverse conversion. Diagram/artifact map types are the shared Project3 types. The language call site retains its original migration, limits, located error mapping and final body-kind checks.
  • The frozen source/JSON parity test compares complete model and migration report without invoking the unfinished canonical source8 reader. Existing definitions{} / null / populated and arbitrary-unknown JSON controls reach the unchanged Project3 deny_unknown_fields path. The raw duplicate-schema replacement matches the checked-in fixture spelling and asserts that replacement occurred; json_codec's Version visitor uses serde's duplicate_field error, supporting the lowercase duplicate assertion.
  • After the alias fix, the prose pair's OA Activity and SA Function unit constructors match model serde shapes and validation::trace_permits permits their Refinement trace. Both fixtures have matching stable IDs, aliases, empty descriptions, live names and old baseline prose, including newline/Unicode data. The baseline's historical names intentionally differ from live names. None semantic history is omitted on serialization by the existing model attribute; explicit source semantic none and populated semantic content are rejected before null interpretation for versions below5. The expected require schema/source5 substring matches the current diagnostic.
  • SemanticBaseline { facets: Vec::new() } is a valid Rust construction of the actual public struct (semantic/types.rs:258). The scratch test uses Some of it solely to verify that the frozen Trace4 conversion refuses the semantic field; semantic evaluation/validation is not needed to reach that rejection. Clearing elements before this particular guard avoids the earlier current-elements check, as intended.
  • Fixture include paths resolve from src/language/source3_bridge/tests.rs to crates/oa-core/tests/fixtures. No test setup compiler defect was found by inspection. Compilation remains unperformed.

Limits of this review

The bridge implementation has no additional identified production-source defect within this bounded review. Correcting the fixture alias is required before claiming four executable tests pass. This bridge does not repair canonical source8 output/reopening or bundle upgrade's final schema8 recompile; the existing end-to-end source/migration/checked-save gates must remain unchanged. No runtime or memory result is claimed.

Correction follow-up

The root corrected all three OA alias spellings to reviewed_activity during review. Inspected updated test bytes SHA256 b680e743554f995618473760b10ca0df509c88c1cdf8bf4cfe3edd95b4e3ce6f: source declaration, source reference and independent JSON alias now agree, with the same UUIDs/names/prose. This addresses the identified fixture defect by source inspection. function is absent from the complete model.rs::reserved_alias list, has valid identifier characters, and is not a declaration word (sa_function is); it requires no rename. No additional finding remains on the reviewed corrected source. Compiler/runtime verification is still pending.