{
  "id": 16586283,
  "title": "How I built a test that walks the shipped import graph: the missing module that bricked Ankita 2.7.0",
  "url": "https://urgent.news/2026/10/26/how-i-built-a-test-that-walks-the-shipped-import-graph-the-missing",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-26T10:26:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/krish_verma_77e28d3fd63ca/how-i-built-a-test-that-walks-the-shipped-import-graph-the-missing-module-that-bricked-ankita-270-j6"
  },
  "original_language": "en",
  "account": "On February 22, 2023, Ankita 2.7.0 was released, but users found the desktop app would not start after the update. The root cause was a missing module in the packaged import graph, leading Ankita to write a test that walks the shipped import graph to prevent such issues in the future.\n\nThe issue stemmed from Ankita's split personality: the packaging config listed some directories for packaging, but not others. This resulted in two copies of the chatgpt-companion module: one as real files in extraResources and another inside the ASAR archive. When the Electron main process imported the companion module, the relative import resolved correctly on disk but failed in the packaged artifact.\n\nThe test, named test/desktop/chatgpt-package.test.mjs, enumerates every module under the code trees and checks if the packaged files contain relative imports. If any missing modules are found, the test asserts the map is empty. In the v2.7.0 configuration, the test failed for desktop/chatgpt-companion/sign-in.mjs, which was imported by desktop/electron/chatgpt-sign-in.mjs, reproducing the production crash as a unit-test failure. Fixing this required adding desktop/chatgpt-companion/**/* to the builder's files list.\n\nThe test has certain limitations: it only checks literal specifiers, does not account for dynamic imports, and trusts the builder's matcher to predict the artifact contents. While a test that builds the real ASAR and boots the main process could catch more bugs, it would be slower, more complex, and more prone to failures. The decision ultimately boils down to balancing thoroughness with practicality.",
  "summary": "How I built a test that walks the shipped import graph: the missing module that bricked Ankita 2.7.0 Ankita is my open-source desktop AI companion — local-first, MIT-licensed, your models. Yesterday I shipped v2.7.0. This morning I shipped v2.7.1, and the only reason it exists is embarrassing: after updating to 2.7.0, the desktop app would not start at all. The main process died with…",
  "key_points": [
    "Ankita 2.7.0 released on February 22, 2023, but desktop app failed to start",
    "Missing module in packaged import graph caused desktop app crash",
    "Test walks shipped import graph to prevent similar issues in future"
  ],
  "editors_take": "Automating the verification of packaged import graphs prioritizes developer velocity by catching configuration mismatches before they reach users without the overhead of full integration testing.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}