fix(installer): avoid staged and installed capture class collision
This commit is contained in:
@@ -95,3 +95,37 @@ commissioning. Economic replay-based automatic family selection, full corrected
|
||||
feedback/control integration, long-term outbox/server retention and real live/
|
||||
failure acceptance remain open. Existing trial gates are unchanged. No sensor,
|
||||
accounting or hardware evidence identifier is fabricated by data ingestion.
|
||||
|
||||
## Installer class-path correction (2026-10-03)
|
||||
|
||||
The original commissioning installer loaded `source/libs/NetzfahrplanV4Messaufnahme.php`
|
||||
while importing observation history. A later Manager callback loads the installed
|
||||
copy at `modules/Enelix-EMS/libs/NetzfahrplanV4Messaufnahme.php`. PHP's once-only file
|
||||
inclusion does not deduplicate class declarations across those different files.
|
||||
The dependent `NetzfahrplanV4Bilanzierung` class is subject to the same collision.
|
||||
|
||||
The tested installer-only fix is preserved in
|
||||
`examples/V4ApplicationData/application-class-loading.patch` (SHA256
|
||||
`6d53d74d4059bb1ae3a446350637a4f4a4a73cc2fd64d2fc2f0967bd23ec7173`).
|
||||
When building a commissioning package, load both classes only from the installed
|
||||
module tree, after validating their expected source hashes. Before any require,
|
||||
check both already-loaded origins without autoload. Reject a foreign staged origin
|
||||
with a controlled error; do not hide it by wrapping the class declaration in a guard.
|
||||
Include `installed_capture_bootstrap.php` in the package checksum map. Do not change
|
||||
the installed-module manifest or bless unrelated source changes.
|
||||
|
||||
The Lihrenmoos staging entrypoint has this fix applied, with backups of its original
|
||||
installer and checksum map. No running modules, data files, timers, native callbacks,
|
||||
server components or actuator settings were changed by the repair. Actual completion
|
||||
still requires the user's fresh Symcon invocation of the corrected installer.
|
||||
|
||||
Validation: the original two-path failure was reproduced with the real PHP classes.
|
||||
Thirteen additional isolated installer scenarios passed, including callback/reload
|
||||
loading order, preloaded dependencies, history import, repeat/finished import,
|
||||
foreign-class refusal, partial-import preservation, source drift, registration wait
|
||||
and first installation. These are PHP CLI tests with mocked IPS in temporary trees,
|
||||
not a completed test in the actual Symcon kernel.
|
||||
|
||||
Evidence on the test host:
|
||||
`/srv/agent/netplan-v4-application-build/class-loading-fix/TEST_RESULTS.json` and
|
||||
`FIX_RESULT.json`. The test harness and exact candidate source are retained there.
|
||||
|
||||
Reference in New Issue
Block a user