feat: preserve nested source projects across desktop and REST

This commit is contained in:
2026-09-06 00:17:20 +03:00
parent d364d3c058
commit 4e8575bd11
32 changed files with 4283 additions and 417 deletions
+117
View File
@@ -92,3 +92,120 @@ outgrow shorthand expand that declaration locally instead of rejecting the edit.
injected partial failures and interrupted recovery preserve coherent content.
- Default/minimum-size native editing and save/reopen are observed, not inferred
from compilation. Windows/Linux builds and focused regressions pass.
## Native integration follow-up
On Windows build SHA256 `3210042E61E95748386A57AD67120506F01A9EDB0A74DB40E36F94896C4068EC`
(commit `d364d3c`), root reopened `ui-source-project/native-source-trial.arcadia`
through the native picker. The 21-file project reported 41 objects, 25 links,
zero checks and all changes saved. Both entry rationale and included
`oa/participants.arcadia` rationale were visible in the real editor.
Root renamed Vessel in distress graphically, followed Properties → Source to
the same declaration in its owning file, and inspected the retained comment,
alias and UUID. The expected OA/SA name-drift warning appeared. Model Undo
restored the name/source and removed that warning, returning to all changes saved.
Root inserted an invalid declaration in the included file, switched to the entry,
and observed the inactive file's path/line diagnostic and dirty marker. Apply
rejected it while preserving the accepted 41-object model and the draft.
Architecture displayed a Source drafts pending notice instead of editable
properties. Open source drafts and the diagnostic link returned to the correct
file and selected the invalid line. Deleting it and Apply succeeded; Model Undo
restored the original saved source. Interrupted-journal and minimum-size source
acceptance are still underway; full release completion is not implied.
The independent recovery fixture generator used production core APIs to validate
four isolated originals and recover copies. Exact paths/contracts are in
`D:/CodexBuilds/Capella2-release1-01a06e2e/ui-source-recovery/README.md`.
Root opened `interrupted-mixed/project.arcadia`, inspected the AFTER included
bytes alongside the BEFORE entry, then recovered through the actual UI. The
result was Recovery baseline, two objects, one allocation and zero checks;
BEFORE comment/name bytes returned and the journal retired. The original UI put
recovery below the file list and displayed an internal journal path without
explaining rollback. Root replaced that with a prominent contextual banner.
Banner build SHA256 `91C03202C495DD074DFF328419E215A5C3BE935B15EE88BBA90467565D874C22`
passed native inspection at 1440×900 and exactly 1100×700 client. Save As to the
missing-entry fixture stopped before overwriting its pending transaction and
opened the banner. Root typed a new source comment; the banner remained. Recover
removed the partial first-save files/journal while preserving the current
41-object model and the newly typed draft. Save All then succeeded at the same
path without another picker, writing all 21 files. The app reported all changes
saved, 41 objects, 25 links and zero checks. Disk inspection confirmed the new
entry comment exactly.
The build succeeded after adding the omitted tooltip import. A later Clippy run
encountered the concurrent parser worker's incomplete Declaration initializer;
rerun once parser/writeback interfaces settle rather than treating it as a
verified lint pass.
At 1100×700, root opened `included-syntax-error/project.arcadia`. The included
`model.arcadia:4:17` diagnostic remained visible from the entry file, while the
previous 41-object graphical model remained accepted. Clicking the diagnostic
opened and selected the invalid line. Root inserted the missing description
value, retained the inline comment, and applied all files. The repaired model
adopted atomically as Recovery baseline, two objects, one allocation and zero
checks. Save All succeeded. Native Open reopened the same project with all
changes saved; the selected activity's property showed Saved activity rationale,
and Source navigation showed the original UUID, alias and retained comments.
The banner build then closed normally (session 29002, exit 0); its runtime log
was empty. This completes these Windows source recovery/minimum-size trials;
new nesting and REST implementations still need their own integrated evidence.
## Production nested ownership and REST integration (2026-09-06)
The existing source3 parser now accepts nested element declarations with real
lexical-owner/body spans. The structural writer relocates declaration pieces
after scalar edits, carrying attached comments and original record provenance.
The six-file `examples/source-project/project.arcadia` fixture compiles with
stable IDs, zero semantic diagnostics and three warning-free initial views.
Initial Windows integration passed 416 workspace tests. Root's final pass after
comment, provenance and example follow-ups passed 422; Linux passed 425 (including
platform-specific filesystem checks). Strict Windows/Linux workspace Clippy,
formatting, and optimized Linux desktop/server builds passed. Linux desktop
SHA256 is `C794426BD91980B2384B92884176542B2B081FA7B4ADE8ADA5D7EECEB72D6351`;
server SHA256 is `F7EFAAF3FA42D33D7CA77633BFDC9B9C87B57C558C3D4B1C71D508BF80293992`.
Both normative reST documents rendered through strict Docutils after fixing an
API section underline. Independent parser probes passed 14
malformed cases, 308 token mutations, budgets/spans/stabilization and 600 levels
on a 128 KiB stack. Independent writer probes passed all 125 valid parent
forests on four elements, whitespace/CRLF/compact variants, deletion/UUID reuse,
unchanged-file fidelity and budget atomicity. No material implementation finding
remains from those reviews. Source-preservation wording was qualified for
explicit nested reparenting. A fresh agent spawn hit the thread limit, so
reviewers examined artifacts implemented by another worker.
Review/reproduction fixed two material defects: equal-model delete/recreate
commands skipped provenance-aware source updates in desktop/server, and a
comment after an owner's opening brace followed a moved child. The latter
failed its focused reproducer before the fix and all 12 nested updater tests
passed afterward. All 12 Document tests passed, including exact nested source
Undo/Redo, rejected Apply and reopen.
Root operated the actual server at loopback port 18788: imported a nested
three-file project (201), applied a comment-only revision 2 with an unchanged
model, reparented a child across files with its rationale at revision 3, rejected
the original ETag (412), stopped and restarted the service, and verified exact
model/source/ETag preservation plus conditional source GET (304). Trial records
are in `D:/CodexBuilds/Capella2-release1-01a06e2e/source-project-service-trial`.
Runtime logs contain only the expected listening messages. The restarted server
was stopped; fresh process inventory confirmed it is no longer running.
Windows native build SHA256
`51002E90C7C75880FF054931343ADD48DE9970A29D9DDD294EB749E3C665F49C`
opened a separate copy of the six-file example. Root inspected OA allocation,
SA boundary/ports and functional containment views, changed Assess report's
semantic parent to Assure response quality in Properties, and applied it. The
outline and diagram adopted the new hierarchy; the performer remained Rescue
coordination system and Report input stayed owned by Assess report. Existing
coordinates remain authored: Arrange plus Fit produced a readable updated view.
Source navigated directly to `sa/assurance.arcadia` and displayed the relocated
function, port, UUIDs and leading/trailing rationale. Undo arrangement then Undo
reparent restored the original files and all-changes-saved state. Both Redo
operations succeeded. Save All wrote six files; disk inspection confirmed the
new declaration ownership and unchanged allocation. Native Open reopened the
saved project with 22 objects, 13 links, zero checks and all changes saved; the
SA allocation view retained the same participant/function ports and exchanges.
Minimum-size follow-up, independent native review and actual rebuilt Linux
nesting trial are still pending.