4.8 KiB
Process aggregate removal source-budget investigation
Scope: local branch codex/scenario-multiselect-9e8r6t-20260924, parent-provided baseline 7323a80e. Static investigation only; no Cargo, GUI, Gitea, commit, or runtime experiment performed. No production or test source edited.
Finding
No legitimate source-growth case was found for an admitted Process / Functional Chain aggregate removal. Do not transplant the Scenario lifeline budget fixture by giving Process contributions invalid references, alter a prepared command to perform unrelated growing changes, or reduce private Document limits after loading. Those would test a different operation or an invalid model.
The existing Process regression (crates/oa-desktop/src/app/process_removal/tests.rs:205) replaces the admitted plan with Delete(existing) + Delete(nonexistent). It evaluates atomic engine failure and App recovery, not an actual source update failure. Keep that evidence boundary explicit.
Evidence and excluded candidates
behavior/topology/group_removal.rs:176admits only listed local contributions or locally maintained SequenceLink / ContextualLink.behavior/topology.rs:395restricts contributions to Action, Exchange, Control and SequenceReference occurrences. Removing a reused contribution does not remove its referenced definition or the referenced work/exchange.oa-core/src/references.rs:325cascades ownership, incident relations, contextual references, diagram nodes, traces and artifact links. A contextual link referencing a removed occurrence is deleted, not rewritten to a longer reference. No new identities are introduced by the removal plan (group_removal.rs:263).references.rs:459removes records and prunes surviving steps, constraint lists, view options, routes and Scenario layout references. Process occurrence and maintained-link identities cannot be valid targets of the optional work, sequence, scenario, lifeline, supertype, operation-allocation or exchange fields that becomenonewhen their targets disappear.- The plausible remaining optional occurrence reference,
reply_to, cannot reference an admitted Process contribution:validation.rs:1626rejects Call/reply semantics outside Scenario;validation.rs:1688requires the target Call to belong to the same Scenario. State trigger fallback text likewise requires Event or work targets (validation.rs:2619), not occurrence or maintained-link targets. view_options.rs:96retains explicit empty selection variants and only filters their identity lists; no longer enum is substituted.source_project.rs:1516uses identity keys for surviving reference list entries, preserving surviving syntax/trivia and stripping deleted tokens.item_keyat approximately 1695 keys references, routes and semantic rows.triviaat 1127 filters input tokens without adding bytes. Structural deletion insource_project/source_structure.rsretains trivia of deleted declarations and does not create/move surviving records for this cascade. There was no credible canonical-format expansion candidate in the paths inspected.
These are reviewed code-path observations, not a formal proof that every possible accepted source spelling is byte-monotone. No claim of an exhaustive runtime search is made. OA and SA share these admission and cascade rules; saved views add record/list pruning, not a discovered growth mechanism.
Better evaluator
- Retain the existing Process injected engine-failure test with its precise scope. It already checks snapshot identity, exact model/bundle, editor/workspace, selection targets/primary, camera and usable redo. Future strengthening may add revision/clean state, selection generation and navigation, but cannot turn that test into source-write-failure evidence.
- Use
app/scenario_removal/tests.rs:199as the genuine source-budget failure evaluator: valid lifeline removals rewrite many short@a/@breferences in surviving messages tonone, prove unrestricted exact-model success and net source growth, and fail through publicDocument::from_bundlelimits. That test covers the shared Document transactional source-write boundary plus Scenario App recovery. - If explicit Process source-write failure branch coverage is required, introduce a narrowly scoped test fault at the Document source writer, and label it an injected source-writer failure. That is more honest than a semantically invalid growth fixture, but adds a test seam and is outside the delegated tests-only scope. A meaningful non-fault alternative is a public input-sized-budget successful Process removal test over the literal native fixture; it checks that deletion remains possible at the admitted source budget, not failure atomicity.
- Revisit if Process semantics gain surviving optional references to contributions or if source editing changes to insert replacement syntax during removal.