Skip to content

GitSync adopts a stale prebuilt assembly over the source it just synced — silently running last week's code, and it destroyed client data #2813

Description

@rbuergi

What happened

A git_hub_sync update pulled new source for Crm/Migration, then adopted a prebuilt assembly instead of compiling what it had just pulled. The node reported success. The next run executed the old code and destroyed live client data.

Sync activity Crm/_Activity/0c389edf, 2026-08-30T17:06:04Z:

Fetching the branch HEAD from GitHub and importing the deltas…
Recompiling 2 NodeType(s): Crm/Migration, Crm/Opportunity
Adopted 2 prebuilt assembly(ies) — the rest compile.
Imported Imported (6 node(s)).

Status Succeeded. Nothing in that log tells an operator that the assembly now serving Crm/Migration was not built from the source in the line above it.

Why it was wrong, provably

The synced commit (904854f) contained three fixes merged ~40 minutes earlier. A migration run at 17:06:37 exhibited all three pre-fix behaviours:

fixed in the synced source what the adopted assembly did
read the document body shape-tolerantly stripped the body from 4 promoted documents
a bullet whose bold text is a link is not a person promoted 2 documents to Crm/Contact
never promote/suggest a node already typed Crm/* suggested the client's own Crm/Opportunity

I then forced a compile via the compile verb. Afterwards compiledSources matched currentSourceVersions and the MVID changed (ed21acce…07d5ca73…), confirming the adopted assembly had been built from different source than the node was holding.

The damage

Four client documents lost their entire text — one a 7,000-word commercial offer. Recovered from version history.

One did not recover. PartnerRe/EslLifeCycleProcess has exactly one version in history — the one the stale code wrote. restore_from_point_in_time returns "No version found at or before…", and content indexing is off on that deployment, so there is no chunk copy either. Its markdown body is permanently gone.

Why this is worse than a normal staleness bug

The operator did everything right: merged a green PR, ran check, ran update, saw Succeeded, saw the NodeType at compilationStatus: Ok with compiledSources == currentSourceVersions. Every signal available said the fix was live. The adopted assembly is what made all of those true while being false in the only way that mattered.

What I think the fix is

  1. Never adopt a prebuilt for a NodeType whose source just changed in this import. The import knows which sources it wrote; that set should force a local compile.
  2. If adoption stays, it must be verifiable. Record on the NodeType which commit/source-hash the adopted assembly was built from, and refuse adoption when it does not match currentSourceVersions. Today compiledSources is populated in a way that makes an adopted assembly indistinguishable from a compiled one.
  3. Say it in the log. Adopted 2 prebuilt assembly(ies) should name them and say what they were built from — an operator reading that line cannot currently tell it is a warning.

Point 2 is the important one: this class of bug is invisible precisely because the verification I was taught to do (compiledSources vs currentSourceVersions) reported healthy.

Secondary: the hub did not recover

After the forced compile, Crm/Migration's hub stopped responding — the control-plane watcher no longer picks up an actionable request, and get @{instance}/area/Run times out. recycle on the NodeType did not clear it. Possibly a separate defect around compile-while-hub-live; noting it here because it is the state the forced recompile left behind, and it is currently blocking the migration.

Evidence: Admin/Migration/restructure-all-2 on memex.systemorph.com sits at requestedAction: Run, state: Requested, execute: true and is never picked up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions