One Declaration Can Contain Two Owners
Why mixed first-party and vendor declarations need a narrower carve than a whole-statement delete.
Scope: Engineering or methodology note based on a September 17, 2026 snapshot. Source-level behavior is not a public availability or universal compatibility claim. Any scenarios are illustrative, not customer outcomes.
A minifier can place several declarators into one top-level statement. Some may belong to a dependency; others may belong to the application. Deleting the statement because one part matches a library would erase the ownership distinction that recovery needs to preserve.
Kalu’s span-carve producer supports bounded mixed-declaration handling. It can preserve supported trailing first-party declarators while removing a proven package binding. That is narrower than arbitrary statement demixing, and the distinction belongs in the product explanation.
The statement is not the ownership unit
Imagine a synthetic statement that initializes a recognized library value and then defines an application-specific configuration. They share punctuation, not necessarily ownership. A whole-statement removal could produce a clean import and a broken application.
The relevant question is which exact ranges can be removed while leaving a valid and meaningfully equivalent retained statement under the supported rules. The producer needs source-bound locators and consistent export mappings, not a broad visual selection.
Refuse shapes the producer cannot justify
The current implementation requires specific source and locator forms. Unsupported declaration shapes refuse rather than broadening the edit until parsing succeeds. Re-parsing is necessary, but it is not enough: many incorrect edits produce valid JavaScript.
The verifier therefore reconstructs the expected output from the original source and checks the rewrite bindings. The input bytes, output bytes, paths, import names, and removal spans remain part of the evidence. A plausible diff is not a substitute for that derivation.
Preserve the next-stage obligations
A verified carve still does not establish an exact install pin, a passing independent gate certificate, or a durable publication receipt. Those belong to the externalization and transaction owners. The carve is a bounded rewrite proposal with stronger evidence, not the entire recovery operation.
This article describes the implementation boundary found in the September source snapshot. It should not be read as support for every minified mixed declaration or every package family.
For engineers, the useful lesson is that source syntax and code ownership are different maps. A recovery system needs to navigate both. The safe boundary may cut through a statement, but it should never cut through an unresolved ownership claim merely to make the output easier to read.