Repository navigation
14 scripts carry cosmetic brace-injection damage (};//, comments swallowed); compile but outline degraded #890
Description
Rationale
14 additional scripts carry COSMETIC brace-injection damage from the 13103f0→#581 import chain — they COMPILE (invisible to any compile sweep) but their stored outline no longer matches the authored comment hierarchy. Signature: "};//" (comment text swallowed after an injected close-brace). Invisible to functional tests but degrades code readability and maintainability. All are repairable from pre-13103f032 mirrors (verified round-trip-stable).
Current State
Cosmetic brace-injection damage identified (provenance: commits 13103f0 and #581):
- Same corrupting mechanism as userland.cleanRoot (12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879's brace corruption)
- Commit 13103f0 (2026-03-21): guillemet sed mangled mirror corpus, claiming "no functional change"
- PR db: add db.compactDatabase + slim Virgin.root from 99 MB to 11 MB #581 (2026-05-07): imported mangled mirror back to ODB
- Result: "};//" pattern — comment text swallowed after injected close-brace
Affected scripts (14 total):
- system.menus.handlers.repl.help
- system.menus.handlers.repl.clear
- system.menus.handlers.repl.keycodes
- system.menus.handlers.repl.exit
- script.newScriptObject (ITSELF damaged)
- op.newOutlineObject (ITSELF damaged)
- html.dialog.draw
- soap.rpc.client
- xml.rss.formatDrivers.feed.compile
- Manila wizard.callbacks.customRenderer
- Manila wizard.callbacks.getValue
- Manila wizard.callbacks.setValue
- xmlStorageSystem wizard.callbacks.getValue
- xmlStorageSystem wizard.callbacks.setValue
Impact:
- Scripts compile successfully (invisible to compile sweep)
- Stored outline structure diverged from authored hierarchy
- Code readability degraded (comments swallowed)
- Maintainability impact (outline navigation confused by missing structure)
- No functional impact (comment injection doesn't break execution)
Desired Outcome
Repair all 14 scripts from pre-13103f032 mirrors (verified round-trip-stable):
- Restore correct outline hierarchy
- Verify compile after repair (should remain green)
- Verify no functional regression (comments are cosmetic)
Recommendation
Repair source: Pre-13103f032 mirrors (verified stable)
git show 13103f032^:usertalk_scripts/system/menus/handlers/repl/help.ut
Repair method: Reinstall each via script.newScriptObject using the correct pre-13103f032 source
Integration: Natural home is root-build plan's Step 5 (repair-in-text) — repair all three damage classes together:
- 12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879 (3 corrupted: cleanRoot, openUrl, isValidUrl)
- 14 scripts carry cosmetic brace-injection damage (};//, comments swallowed); compile but outline degraded #890 (14 cosmetic: brace-injection)
- Plus pre-existing documentation/example outlines (leave as-is)
Exit Criteria
- All 14 scripts reinstalled from pre-13103f032 mirrors
- Verify: all 14 compile successfully after repair
- Verify: no functional regression (comments are cosmetic)
- Verify: outline hierarchy restored (comments visible in outline navigation)
- Cross-check: no other scripts carry similar brace-injection damage
Related Context
- Found by: Provenance investigation following 12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879 correction, 2026-08-11
- Related issues: 12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879 (3 corrupted scripts, 12 Virgin.root scripts genuinely broken in DB (fail to compile in place); webBrowser.openURL + cleanRoot block #855 #879 major correction), 65 Virgin.root scripts fail round-trip idempotence (string->newScriptObject); latent normalization divergence #878 (round-trip non-idempotence), ROOT_BUILD_FROM_SOURCE_PLAN.md (Step 5 repair-in-text)
- Root cause: Commits 13103f0 (destructive sed) and db: add db.compactDatabase + slim Virgin.root from 99 MB to 11 MB #581 (import of mangled mirrors)
- Repair source: Pre-13103f032 mirrors (git show 13103f0^:...)
- Verification: Round-trip stable (mirrors tested today)
- Scope: 14 scripts, all compile, all repairable
Damage Class Definition
Cosmetic brace-injection damage: Signature "};//" (injected close-brace swallows subsequent comment text). Invisible to compile (scripts remain valid) but outline structure diverged from authored hierarchy. Contrast with functional corruption (#879, #881) where scripts fail or behave incorrectly.
Prevention
Future modernization passes (sed, mass edits) on mirror corpus must:
- Include compile verification (catch brace-injection immediately)
- Preserve outline structure (validate comments are intact)
- Use structural tools, not regex (avoid sed traps)
- Test round-trip: mirror → ODB → mirror idempotent
Activity
feat(odb): --diff-roots value-level equality walker (root-build Step …