Repository navigation
LF-single-node script corruption in Virgin.root (embedded LF, zero CR); webBrowser.openURL root cause, #855 unblocker #881
Description
Rationale
LF-single-node script corruption in Virgin.root — a THIRD stored-damage mechanism, distinct from #866's scanner bug and #877's stale DB. Signature: entire script body crammed into ONE outline node with embedded LF (0x0A) bytes and zero CR — a .ut import path that skipped LF→CR normalization. This is the ROOT CAUSE of #865's webBrowser.openURL failure. Repair is cheap and proven: reinstall once via script.newScriptObject (which does LF→CR normalization first-thing) repairs both affected scripts, persists across fileMenu.save + fresh process, verified behaviorally. Works on pre-#866-fix binaries too (no #866 dependency). This is the #855 unblocker.
Current State
LF-node corruption identified (2026-08-10):
- Entire script body in ONE outline node with embedded LF (0x0A) bytes
- Zero CR bytes (native UserTalk line ending is CR 0x0D)
- Signature of .ut import that skipped LF→CR normalization
Confirmed victims:
- system.verbs.builtins.webBrowser.openURL (1 node, 26 LF) — THIS IS webBrowser.openUrl fails to compile headless; blocks first-run finishInstall flow #865's root cause
- string.isValidUrl (1 node, 15 LF)
Repair verification (proven, 2026-08-10):
- Reinstall via script.newScriptObject (LF→CR normalization is first-line operation)
- Both scripts repair in place
- Persist across fileMenu.save + fresh process restart
- Behavioral verification: isValidUrl returns true (functional, not just syntax)
- Works on pre-langscan comment-strip scanner ignored single-quoted char constants: 0xC7 inside 'x' literals corrupts scripts cumulatively on install (was misattributed to newScriptObject size/reinstall) #866-fix binaries (no langscan comment-strip scanner ignored single-quoted char constants: 0xC7 inside 'x' literals corrupts scripts cumulatively on install (was misattributed to newScriptObject size/reinstall) #866 dependency on the fix)
Impact:
- webBrowser.openURL broken (blocks Virgin.root ships firstRootRun=false, breaking firstRootRun contract; 9 integration tests depend on skipped init #855 first-run finishInstall)
- string.isValidUrl broken (utility verb unavailable)
- Root cause now identified; unblocker for Virgin.root ships firstRootRun=false, breaking firstRootRun contract; 9 integration tests depend on skipped init #855 is dispatchable now
Desired Outcome
- Repair the 2 known LF-node scripts (openURL, isValidUrl) via script.newScriptObject
- Scan Virgin.root corpus for stored-node-text-containing-LF to size the class beyond 2 known
- Identify provenance (which import path skipped LF→CR normalization)
- Update webBrowser.openUrl fails to compile headless; blocks first-run finishInstall flow #865 to reflect actual root cause (LF corruption, not missing headless implementation)
- Unblock Virgin.root ships firstRootRun=false, breaking firstRootRun contract; 9 integration tests depend on skipped init #855 (first-run flow can proceed after repair + flag flip)
Recommendation
Immediate (dispatchable now, no #866 dependency):
For each of webBrowser.openURL and string.isValidUrl:
1. Read current script via protocol: string(@system.verbs.builtins.webBrowser.openURL)
2. Reinstall via script.newScriptObject (normalizes LF→CR automatically)
3. Verify: script compiles in place, behaviorally correct (e.g., isValidUrl("foo@bar.com") returns true)
4. Persist via fileMenu.save
Follow-up:
- Corpus-wide scan for stored-node-text-containing-LF
- Identify count and names of all affected scripts
- Batch repair via script.newScriptObject
- Investigate provenance (trace which import caused LF→CR skip)
Exit Criteria
- webBrowser.openURL reinstalled and compiles in place
- string.isValidUrl reinstalled and compiles in place
- Both verified behaviorally (openURL callable, isValidUrl returns correct values)
- Corpus scan complete: identify all scripts with embedded LF
- Provenance identified: which import path skipped normalization
- webBrowser.openUrl fails to compile headless; blocks first-run finishInstall flow #865 updated: root cause is LF corruption, not missing headless verb
- Virgin.root ships firstRootRun=false, breaking firstRootRun contract; 9 integration tests depend on skipped init #855 can proceed (first-run unblocked after repair + flag fix)
Related Context
- Found by: langscan comment-strip scanner ignored single-quoted char constants: 0xC7 inside 'x' literals corrupts scripts cumulatively on install (was misattributed to newScriptObject size/reinstall) #866 investigation, 2026-08-10
- Related issues: webBrowser.openUrl fails to compile headless; blocks first-run finishInstall flow #865 (webBrowser.openURL failure — now root-caused), Virgin.root ships firstRootRun=false, breaking firstRootRun contract; 9 integration tests depend on skipped init #855 (first-run flow, now unblocked), 12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879 (broken scripts — some are LF-node corruption, not genuine DB corruption), langscan comment-strip scanner ignored single-quoted char constants: 0xC7 inside 'x' literals corrupts scripts cumulatively on install (was misattributed to newScriptObject size/reinstall) #866 (scanner bug, distinct from this corruption)
- Code: Virgin.root scripts (2 confirmed LF-node victims), import/normalization path
- Repair mechanism: script.newScriptObject (LF→CR normalization), fileMenu.save persistence
- Verification: behavioral tests (isValidUrl returns correct result)
- Dependency: NONE — repair works on pre-langscan comment-strip scanner ignored single-quoted char constants: 0xC7 inside 'x' literals corrupts scripts cumulatively on install (was misattributed to newScriptObject size/reinstall) #866-fix binaries
- Corpus: need to identify full scope of LF-node corruption
Distinct from Other Issues
- NOT langscan comment-strip scanner ignored single-quoted char constants: 0xC7 inside 'x' literals corrupts scripts cumulatively on install (was misattributed to newScriptObject size/reinstall) #866 (scanner/parser bug in compile path) — this is stored data corruption
- NOT databases/Frontier.root is stale (pre-#621, doubled-brace corruption); source of #866 false diagnosis #877 (stale DB) — this is pre-existing damage in current Virgin.root
- NOT 65 Virgin.root scripts fail round-trip idempotence (string->newScriptObject); latent normalization divergence #878 (round-trip non-idempotence) — this is broken persistence, not normalization drift
- NOT 12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879 (genuine compile failures) — this is fixable-by-reinstall, proven cheap repair
Methodology Note
The cheap repair (script.newScriptObject does LF→CR normalization automatically) proves the issue: if reinstall fixes it, the damage is in the stored bytes, not in the code path. Behavioral verification (isValidUrl returns correct result) proves the fix is functional, not just syntactic.
Activity
jsavin commentedon Aug 11, 2026
C-Level Mechanism Proven (#881 LF Corruption Deep Dive):
Root cause chain:
Damage window (bootstrap ordering trap):
Frozen since birth: Both victims carry identical md5 since creation (never re-normalized after the C-layer fix).
Corpus scan complete (3,499 script+outline values on current Virgin.root):
METHODOLOGY WARNING for repair/verification (burned three scans):
Repair confirmed working: script.newScriptObject normalizes LF→CR automatically (C-layer fix via PR #542 now active).
fix(odb): #881 repair LF-single-node corruption in webBrowser.openURL…
feat(odb): --diff-roots value-level equality walker (root-build Step …