11 KiB
Independent public-adoption critique
Source-only assessment at edf096cd33350865ecfc3c65ec266a6c0d3c4000. No production changes, builds, execution or remote writes. Written independently before reading the implementation agent's ADOPTION-MAP. These are proposed next outcomes, not an adoption decision or acceptance claim.
Recommended immediate outcome
First restore the existing ordinary architecture source8 round trip, retaining explicit refusal of unsupported typed analysis declarations. This is smaller and more immediately useful than promoting the complete private mixed pipeline into the existing editing authority: the public writer already emits version8 while the ordinary public reader rejects it. Repair that compatibility boundary, then exercise the actual ordinary compilation/migration/edit/save workflows it enables. Do not describe this as complete source8 analysis support or assume one version-token change makes the whole checkpoint pass.
All16 currently inherited library failures stop at the same public schema refusal: six nesting/source examples and ten disk transaction controls. Several never reach the behavior their test names describe. The final raw full log therefore establishes a concrete compatibility blocker, not16 demonstrated defects in transaction or nesting algorithms. Removing the gate can reveal further defects; the tests must actually complete afterward. Restoring these existing user paths is a useful dependency, not a replacement for mixed authoring parity.
If the next selected milestone specifically needs mixed-analysis users to gain a capability, choose a separately scoped source8 check/lint path before generic editable compilation. It may return exact input-coordinate diagnostics without producing the legacy mutable compiled/index structure. Include discovery, caller limits and explicit-ID scope must be handled deliberately; a dispatch only at the last parse call is insufficient. Full public mixed read acceptance still needs its language/identity contract, described below.
Source-grounded seams and hazards
| Seam | Actual behavior and implication |
|---|---|
oa-core/src/model.rs:9, language.rs:506, source_project.rs:586 |
SCHEMA_VERSION is8 and both public formatters emit it. language.rs:1541 admits only3..7 outside the private mixed mode. This blocks ordinary writer→reader and migrated-output recompilation today. |
language.rs:343..493, source_project.rs:287..306 |
Public parse has model/report semantics; compile_bundle additionally inserts omitted UUIDs, recompiles returned bytes and performs migration. Neither is merely a predicate. source_migration.rs:5..83 rewrites the version to current8 and then recompiles. |
language.rs:1291, analysis_source/mixed.rs:239..260 |
Private mixed mode rejects omitted ordinary/header IDs and typed/parameter IDs. The public ordinary compiler promises stabilization, including nested declarations. A blind mixed dispatch would regress valid authoring with omitted identities; do not invent untracked random IDs inside the new consumed witness. |
language.rs:522..607, analysis_source/write.rs:427,518,626 |
The public declaration formatter has no definitions loop; analysis elements go through the generic serde payload writer. The private typed Writer provides separate definition/analysis-element/typed-declaration methods but is not composed into public canonical output. A complete admitted model is therefore not evidence of a lossless public export. |
source_project.rs:111, :620..714, :877 |
CompiledSourceProject exposes bundle/model/index as mutable data. The updater defensively recompiles, compares the complete index/model/bundle, formats old/new declarations, performs structural edits and recompiles/equality-checks the result. The private occurrence maps are not this SourceIndex, and rename-only coverage cannot stand in for generic structural edits. Existing equality guards cause many unsupported changes to fail closed; corruption is not inevitable, but successful editing is unproved. |
source_project.rs:203..265, source_files.rs:390..533 |
Disk include discovery calls inspect_includes, which uses the legacy parse_unit. The loader subsequently compiles if discovery succeeded. A new full-bundle mixed reader alone cannot load a disk project whose entry/include inspection still rejects its syntax. Preserve strict syntax-based discovery and aggregate file/edge/depth/path checks; do not substitute a regex include scan. |
source_files.rs:819..879 |
Save revalidates compiled bundle, model, index and entry before publication/conflict checks. AcceptedRename has no legacy SourceIndex. Do not bypass this revalidation by manufacturing a CompiledSourceProject from the accepted model and an incomplete index. Existing conflict/journal/path rules remain useful and required. |
oa-desktop/src/document.rs:299..395 |
Commands call update_bundle_with_identity_map; apply_compiled recompiles public fields; commit/undo/redo store the complete Arc. History-byte estimation also serializes the model (:24). Adopting only accepted model or only source breaks the existing paired-state boundary; source8 work cannot silently claim history support from the private owning result. |
oa-server/src/store.rs:117..173 |
New models are formatted then compiled and equality-checked; source imports compile; commands/replacements use the same generic updater. Changing compile_bundle affects server adoption too, not just a local reader. |
oa-cli/src/lib.rs:213..357 |
Check and rename share prepare: disk discovery, raw lint, then unconditional compile/stabilization. Check refuses write, but its present implementation still needs CompiledSourceProject. A diagnostic-only mixed check needs an explicit early report route; switching only lint would still encounter legacy compile. |
Private language::analysis_source and Parser mixed state are currently under cfg(test) (language.rs:6..9,1219 and producer hooks). Any real adoption must compile a non-test consumer, not merely pass more oa-core unit tests. Promote only the required production seams; fixture constructors must remain test-only. mixed.rs:279..341 currently derives bounded private Limits separately from final ProjectLimits and identifies the ceilings as uncalibrated public policy. Select those ceilings explicitly for the new entry point, preserve caller constraints, and retain the existing logical-domain exclusions; neither silently dropping the limits nor inventing universal heap accounting is justified.
Depth contracts are different: ordinary recursive values retain64 (language.rs:1407), typed expressions retain logical128 (analysis_source/syntax.rs:367), and declaration/include traversal has separate limits. language_nesting_tests.rs:239..263 explicitly protects ordinary depth64. Enabling typed expressions is not permission to raise every generic record/value limit or conflate logical depth with native stack capacity.
Candidate comparison and precise boundaries
- Ordinary source8 compatibility — recommended first. Preserve ordinary grammar, explicit analysis refusal at
language.rs:1861, ID stabilization, migration reports and existing source index/update contracts; admit the current schema only through the supported ordinary path. Demonstrate all ordinary formatter/migration outputs reparse completely. Keep short typed declarations and long analysis constructors rejected through public edit paths until their adapter is actually complete. This does not waive future typed writer, scoped names or identity support. - Separate mixed check/lint — safe as an explicitly bounded next capability. Reuse complete mixed parsing/resolution and exact diagnostics, without emitting source, creating editable compiled authority or calling old formatters. Decide whether this first interface intentionally accepts only already-stable explicit-ID bundles; if so, name/document that finite scope and keep general source8 read acceptance open. A general public replacement must implement omitted-ID semantics instead. Production initial-input authority also needs a deliberate constructor/policy boundary: fixture borrowed-zero authority and a PendingRename carry cannot be substituted for a new raw-input admission path. Preserve the existing owner-relative meaning of C; do not reset a live pending carry to zero.
- Dispatch mixed parsing from every existing public compile API immediately — reject as presently incomplete. It simultaneously promises stabilization/index compatibility to disk save, structural updates, migration, desktop and server callers. The private AcceptedRename deliberately lacks those interfaces. An incomplete SourceIndex is not an acceptable adapter, even if the parsed Project is correct.
- Owned rename adoption before broad structural edits — viable narrower write milestone, but larger than read-only checks. Route an explicit rename intent through the complete original-index→plan→emission→verification pipeline; preserve no-op versus changed outcomes and whole current-bundle stale checks. Then choose one actual adopter, preferably a CLI rename preview before disk commit or history integration. Reuse the existing report's whole-file changes and conflict semantics. Do not send arbitrary Command results to the rename planner, treat parameter names as global aliases, or feed accepted output through the old formatter. A disk-writing adapter still needs authenticated complete returned source/model/diagnostics plus its existing snapshot expectations; a desktop adapter must atomically install and restore the pair. These are concrete adapter obligations, not a reason to redesign all history/storage now.
Finite acceptance for the selected next checkpoint
For ordinary compatibility: run all16 formerly blocked tests to completion, then the existing source_project/nested/identity update, migration and disk transaction integration suites. Add a direct current-schema format→parse and format_bundle→compile→compile equality check, including ordinary OA/SA, nested owners, omitted IDs, comments/Unicode/CRLF and historical trace fields. Exercise at least one real CLI check and rename preview and one non-test consumer build. Confirm old3..7 migrations remain explicit/idempotent and malformed future versions still refuse. Preserve typed-analysis public refusal and private depth/limit controls. This acceptance concerns existing ordinary behavior; its tests do not establish mixed authoring.
For a mixed diagnostic-only milestone: test both supplied bundles and actual multi-file loader discovery; OA/SA typed roots, scoped parameters, unresolved/duplicate references, complete warning locations, malformed inputs, included-file errors and limits. Assert exact input bytes and disk state remain unchanged, no compiled editing/save authority escapes, and errors on omitted IDs match the declared scope. Include a non-test caller so cfg(test) cannot conceal an absent public path.
For later owned rename adoption: retain literal whole-byte/model oracles across global/scoped swaps, Unicode/CRLF and untouched files; successful warnings must refer to returned bytes. Exercise no-op, stale source, resource refusal, true input-owner destruction, failed publication/conflict and whichever actual history adapter is selected. Canonical typed writing and full structural composition require their own complete-model round trips; rename success is not their proxy. Keep the known scratch/path-copy and setup-stack limits explicit, with no new universal guarantees inferred from this adoption work.