Repository navigation
65 Virgin.root scripts fail round-trip idempotence (string->newScriptObject); latent normalization divergence #878
Copy link
Copy link
Open
Labels
priority/p2Medium priority - nice to haveMedium priority - nice to havescope/medium1-2 weeks, requires design work1-2 weeks, requires design worktype/bugDefect in existing functionality, needs fixDefect in existing functionality, needs fixworkstream/database-architectureDatabase format, migration, serializationDatabase format, migration, serialization
Description
Rationale
65 scripts in Virgin.root are NOT round-trip idempotent through string() → newScriptObject. Bytes change on reinstall (still compile true; cosmetic drift, not data-destroying). These represent latent normalization divergences of the #866 class — worth characterizing before any mass re-export/import workflow. Relevant to #869's guest-DB verifier and the ODB<->.ut sync process.
Current State
Round-trip non-idempotency identified (2026-08-10):
- 65 scripts in Virgin.root fail round-trip idempotence
- string(script) → newScriptObject produces different bytes
- Scripts still compile (cosmetic drift only)
- Examples: tcp.im (Jabber/AIM drivers), Manila/xmlStorageSystem callbacks, html macros, soap.rpc, table.tableToXml, sys.openUrl
- Notable: script.newScriptObject and op.newOutlineObject THEMSELVES are on the list
Impact:
- ODB<->.ut sync cannot guarantee byte-for-byte fidelity
- Mass re-export/import workflows risk silent drift
- Normalization differences accumulate
- Pre-existing condition; latent risk for future ODB edits
Severity: Low (scripts still compile; cosmetic not functional)
Desired Outcome
Characterize the 65 non-idempotent scripts before any mass workflow:
- Document the normalization divergences (whitespace, comment format, line endings, etc.)
- Identify root causes in newScriptObject normalization
- Establish conventions for acceptable drift
- Update ODB_SCRIPT_EDITING.md with normalization expectations
Recommendation
- Preserve list: Full list of 65 scripts from 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 (already captured in 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 branch records)
- Characterize drift: For representative samples, show before/after bytes and identify patterns
- Document convention: ODB_SCRIPT_EDITING.md should note that round-trip fidelity is NOT guaranteed for cosmetic properties
- Impact assessment: Determine if verify_virgin_root_sync.sh covers only Virgin.root, not guest-DB mirrors; silent drift accumulates #869's guest-DB verifier should ignore cosmetic drift (recommended)
Exit Criteria
- List of 65 scripts preserved and documented
- Normalization patterns characterized (e.g., comment encoding, line endings)
- Acceptable drift convention established
- ODB_SCRIPT_EDITING.md updated with round-trip expectations
- verify_virgin_root_sync.sh covers only Virgin.root, not guest-DB mirrors; silent drift accumulates #869 guest-DB verifier designed to ignore cosmetic drift (or apply same normalization)
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: 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 (codegen investigation), verify_virgin_root_sync.sh covers only Virgin.root, not guest-DB mirrors; silent drift accumulates #869 (guest-DB verifier), langstripstructuremarkers + oplangtextvisit round-trip drops a closing brace on multi-level outlines #621 (script normalization)
- Code: Virgin.root scripts (65 non-idempotent), script.newScriptObject, op.newOutlineObject
- Examples: tcp.im, Manila/xmlStorageSystem, html macros, soap.rpc, table.tableToXml, sys.openUrl
- Process: ODB<->.ut sync, re-export/import workflows
- Severity: Cosmetic (scripts still compile); worth tracking before mass workflows
Note
This is a low-priority characterization issue. The 65 scripts still compile after round-trip; the issue is fidelity and predictability for future sync workflows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority/p2Medium priority - nice to haveMedium priority - nice to havescope/medium1-2 weeks, requires design work1-2 weeks, requires design worktype/bugDefect in existing functionality, needs fixDefect in existing functionality, needs fixworkstream/database-architectureDatabase format, migration, serializationDatabase format, migration, serialization
Activity
jsavin commentedon Aug 11, 2026
Full script list (from the #866 corpus sweep)
Recording the actual paths here so the data survives teardown of the investigation worktree -- the sweep JSON in /tmp was the only copy.
Method: every script in Virgin.root round-tripped via string(adr^) -> script.newScriptObject, gated on script.compile, with an installer-unrepairable negative control. Checked 2996 scripts (post-fix run, at the #866 fix).
NOT-IDEMPOTENT (65) -- read-back differs from install, but still compiles
These are cosmetic/latent: compile is true before AND after, so nothing is broken today. Listed for the normalization-divergence investigation.
system.agents.StatusMessagesystem.menus.handlers.repl.clearsystem.menus.handlers.repl.exitsystem.menus.handlers.repl.helpsystem.menus.handlers.repl.keycodessystem.verbs.apps.AnArchie.examples.findAndOutlinesystem.verbs.apps.AnArchie.utilities.fileToListsystem.verbs.apps.BBEdit.examples.insertTextAndSavesystem.verbs.apps.BBEdit.examples.replaceAllStringsystem.verbs.apps.Manila.examples.getMessagesystem.verbs.apps.Manila.examples.getTemplatesystem.verbs.apps.Manila.windowTypes.dialogs.wizard.callbacks.customRenderersystem.verbs.apps.Manila.windowTypes.dialogs.wizard.callbacks.getValuesystem.verbs.apps.Manila.windowTypes.dialogs.wizard.callbacks.setValuesystem.verbs.apps.amazon.macros.boxsystem.verbs.apps.google.macros.boxsystem.verbs.apps.trackback.getAutodiscoveryXmlsystem.verbs.apps.trackback.respondToPingsystem.verbs.apps.xmlStorageSystem.nodeTypes.user.data.dialogs.wizard.callbacks.getValuesystem.verbs.apps.xmlStorageSystem.nodeTypes.user.data.dialogs.wizard.callbacks.setValuesystem.verbs.builtins.html.data.standardMacros.opmlToBlogrollsystem.verbs.builtins.html.data.standardMacros.spamFreeMailto.formsystem.verbs.builtins.html.dialog.drawsystem.verbs.builtins.html.getLinksystem.verbs.builtins.op.newOutlineObjectsystem.verbs.builtins.radio.prefs.popupMenuPrefsystem.verbs.builtins.rootUpdates.listPendingUpdatessystem.verbs.builtins.script.newScriptObjectsystem.verbs.builtins.soap.rpc.clientsystem.verbs.builtins.soap.rpc.serversystem.verbs.builtins.sys.openUrlsystem.verbs.builtins.sys.setFrontAppsystem.verbs.builtins.table.tableToXmlsystem.verbs.builtins.tcp.examples.getFromListensystem.verbs.builtins.tcp.getMailsystem.verbs.builtins.tcp.im.builtinDrivers.aim.code.core.recv_eventsystem.verbs.builtins.tcp.im.builtinDrivers.aim.code.incoming.im_insystem.verbs.builtins.tcp.im.builtinDrivers.aim.code.incoming.startsystem.verbs.builtins.tcp.im.builtinDrivers.aim.code.sampleCallbacks.chat_insystem.verbs.builtins.tcp.im.builtinDrivers.aim.code.sampleCallbacks.startsystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.everyMinutesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.examples.pubsub.pubsubSubscribesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.examples.pubsub.pubsubUnsubscribesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.examples.rpc.xmlrpcCallsystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.getPresenceInfosystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.handleMessagesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.handlers.iqRegistersystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.handlers.iqVersionsystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.handlers.presencesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.idTables.createsystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.idTables.deletesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.messages.presencesystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.openConnectionsystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.threadsystem.verbs.builtins.tcp.im.builtinDrivers.jabber.code.waitForIqReplysystem.verbs.builtins.tcp.im.callbacks.startupsystem.verbs.builtins.tcp.im.rpi.serversystem.verbs.builtins.tcp.im.startAllsystem.verbs.builtins.tcp.im.stopAllsystem.verbs.builtins.webBrowser.protocols.otherhandlers.mailtosystem.verbs.builtins.webserver.standardMacros.refererFiltersystem.verbs.builtins.webserver.util.pathToAddressExtsystem.verbs.builtins.window.showsystem.verbs.builtins.xml.plist.tableToPlistsystem.verbs.builtins.xml.rss.formatDrivers.feed.compileFor reference -- PRE-COMPILE-FAIL (12), tracked separately
Broken in the stored DB independent of install. Not part of this issue; classified by mechanism in the #866 thread (LF-single-node corruption, missing kernel verbs, and genuine syntax errors including one deliberate fixture).
system.verbs.apps.Filemaker.examples.transactionssystem.verbs.builtins.quickTime.isPlayingsystem.verbs.builtins.quickTime.opensystem.verbs.builtins.quickTime.playsystem.verbs.builtins.quickTime.stopsystem.verbs.builtins.string.isValidUrlsystem.verbs.builtins.string.nthCharsystem.verbs.builtins.userland.cleanRootsystem.verbs.builtins.userland.oldstuff.Frontier3toArethasystem.verbs.builtins.webBrowser.openURLsystem.verbs.builtins.webserver.data.cgis.samples.syntaxErrorsystem.verbs.builtins.window.quickTimefix(odb): P0 -- mbar compare was vacuous; skip-region offsets were wr…
fix(odb): P1 -- name-keyed matching (hfirstsort is insertion order) +…
fix(odb): P2 batch -- resource teardown, float bytes, subtree depth, …
fix(odb): make the ut-sync guard provable; define never-stored-both-s…
test(odb): commit behavioral fixtures; every compare path proves DETE…
feat(odb): --diff-roots value-level equality walker (root-build Step …