{
  "schemaVersion": "1.0",
  "createdAt": "2026-10-02T15:34:49.340757+00:00",
  "status": "case_and_fixture_suggestions_frozen_before_any_product_execution; runtime_contract_not_frozen",
  "product": "Khoj app",
  "productIdSuggestion": "product:khoj",
  "catalogIntegrated": false,
  "productInferenceRequestsExecuted": 0,
  "sourceEditionForRouteResearch": {
    "currentMasterCommit": "ae229ca894c0b80ad84664afcfdde523b5e87057",
    "currentMasterCommitDate": "2026-08-02T01:55:40Z",
    "currentMasterCommitMessage": "Make chat export robust and fix export truncation (#1314)\n\nExporting chats produced an incomplete conversations.json that missed\nrecent conversations and repeated others.\n\nThe export endpoint paginates by explicit offset and limit rather than a\npage index that slid the query window by a single row per request. The\nqueryset orders by created_at, id, which keeps pagination stable across\nthe multi-request export even when conversations are written to while it\nruns. Both parameters are bounded (offset >= 0, 1 <= limit <= 100), so out\nof range values are rejected at the API boundary instead of raising on the\nqueryset slice or pulling every conversation log into memory at once.\n\nThe web client walks the endpoint until a page shorter than the batch size\ncomes back, which marks the end of the data more reliably than a\nconversation count read once before the loop starts. The loop is bounded\nby a max offset derived from that count, checks each response before\nusing it, and reports progress from the number of conversations actually\nexported.\n\nTests cover pagination across pages, ordering stability when a\nconversation is updated mid-export, and rejection of out of range\npagination parameters.\n\nFixes #1299",
    "latestReleaseTag": "2.0.0-beta.28",
    "latestReleaseDate": "2026-03-26T03:36:04Z",
    "latestReleaseRefType": "commit",
    "latestReleaseRefObjectSha": "9258f57dceab19d52a1a0bdac54eb38576c29187",
    "scope": "Current default-branch source is fixed for read-only native-path research. No package/runtime installed; latest release tag is separately disclosed and not conflated with master."
  },
  "lifecycle": "Hosted Khoj Cloud was sunset April 15, 2026; proposals only concern the self-hosted open-source app.",
  "nativeSurfaceSuggestion": {
    "cli": "khoj --host 127.0.0.1 --port <task-owned-unused-port> --anonymous-mode --non-interactive --log-file <task-owned-log>",
    "setup": "Complete exact-source native app installation, with full declared dependencies and an original official database backend; do not substitute a custom RAG wrapper.",
    "index": "PUT /api/content multipart repeated files fields containing exactly the three frozen Markdown bytes; query t omitted to retain native All default. Fresh isolated database prevents deleting or mixing existing user documents.",
    "answer": "POST /api/chat with each frozen JSON body; current pinned source returns response/references/usage JSON when stream=false. This is native HTTP functionality, not a Gradio/browser interaction claim.",
    "ui": "Original local /chat and /search; native web UI reference panel exposes filenames and compiled source text. UI can be evaluated only after a complete usable local build exists, in a separately identified UI case."
  },
  "runtimePreconditionsNotYetMet": [
    "Select one exact distribution edition before execution. Current source commit, GitHub release 2.0.0-beta.28 and PyPI 1.42.10 are different; verify installed bytes against the selected edition and adapt only in a separately versioned protocol before inference.",
    "A Python 3.10–3.12 environment is required by current source/PyPI; current Python 3.13 cannot be treated as compatible. Full dependencies, Windows pgserver/pgvector startup and bundled UI completeness remain untested.",
    "Fix exact local chat model tag, weight/manifest digest, generation context/settings and license before inference. This research did not start Ollama, inspect private model storage, pull weights or call a model.",
    "Fix exact local bi-encoder and reranker revisions, file digests and licenses before indexing. Current source defaults thenlper/gte-small and mixedbread-ai/mxbai-rerank-xsmall-v1; no model download or cached-model availability was verified.",
    "Use task-owned profile/home/log/temp/database/model/cache roots and synthetic local-admin credentials. Disable telemetry with the official variable; inspect inherited provider credentials/configuration before native initialization to prevent unintended remote provider setup.",
    "Confirm that /notes and frozen corpus are actually used; if retrieval yields no references, the product source can drop the Notes command and answer without document references. Such output cannot pass the citation/grounding conditions.",
    "Record all native provider calls and preserve unedited public-facing answers/references. Exclude hidden model reasoning and private credentials from any later public evidence.",
    "Observe RAM/disk/startup bounds before scheduling a complete install; no current hardware feasibility or latency pass is claimed."
  ],
  "acceptanceMetricDefinitions": {
    "currency": "Exact intended value in USD cents; no tolerance that permits a wrong shipping fee or total. Formatting such as USD 66 or USD 66.00 is equivalent when units are explicit.",
    "stocks": "Exact integer units.",
    "sourceQuotes": "Compare retained quoted evidence to corresponding frozen UTF-8 file text; only line-ending/whitespace normalization is allowed for display formatting, not changing words, numbers or dates.",
    "citations": "Actual native reference.file and reference.compiled fields or native UI equivalent; citation presence alone does not prove answer grounding.",
    "unknownFacts": "Arrival date and refund-processing deadline are separately absent; unsupported answers remain failures.",
    "outcome": "Any failed original condition makes that case failed; missing native generation or citation evidence remains unverified/blocked rather than a passed product case."
  },
  "assets": [
    {
      "path": "fixtures/juniper-inventory-2026-09-30.md",
      "bytes": 358,
      "sha256": "e370946255b6e9c82ee946b73cef0f06002d8dfe6b819211f96c7a0d03f8ac7a",
      "encoding": "UTF-8",
      "lineEndings": "LF",
      "synthetic": true
    },
    {
      "path": "fixtures/juniper-dispatch-2026-09-30.md",
      "bytes": 500,
      "sha256": "235b051a8a68a39fc09b98c0ff6e93dbb622300d8f3cc0135f3b88ee17794759",
      "encoding": "UTF-8",
      "lineEndings": "LF",
      "synthetic": true
    },
    {
      "path": "fixtures/juniper-policy-archive-2025-05-01.md",
      "bytes": 472,
      "sha256": "8b68d8dc247e5cd7010c05e4e32d3f74936f97f44d2ae07448f87763a0e1d8bd",
      "encoding": "UTF-8",
      "lineEndings": "LF",
      "synthetic": true
    }
  ],
  "cases": [
    {
      "id": "khoj-proposed-primary",
      "title": "A small-shop quote grounded in dated inventory and dispatch notes",
      "input": "Three new task-owned synthetic UTF-8 Markdown files: a current 2026-09-30 inventory snapshot, a current 2026-09-30 dispatch policy and one explicitly superseded 2025 archive. All files are indexed in a fresh isolated native Khoj instance. No real user document, business inventory, external account or stock reservation is connected.",
      "instruction": "/notes As of 2026-09-30, draft an internal quote for one BLUE-CANDLE and two AMBER-CANDLE units in an eligible domestic order. Give both current unit prices and starting stocks, the item subtotal, shipping fee, order total, dispatch promise and projected stock after this hypothetical order. Cite the original current inventory and dispatch notes and quote the source passage supporting each factual group. Keep source facts separate from arithmetic. This is a read-only draft: do not reserve stock, place an order or send anything.",
      "nativeRequestBody": {
        "q": "/notes As of 2026-09-30, draft an internal quote for one BLUE-CANDLE and two AMBER-CANDLE units in an eligible domestic order. Give both current unit prices and starting stocks, the item subtotal, shipping fee, order total, dispatch promise and projected stock after this hypothetical order. Cite the original current inventory and dispatch notes and quote the source passage supporting each factual group. Keep source facts separate from arithmetic. This is a read-only draft: do not reserve stock, place an order or send anything.",
        "n": 7,
        "d": null,
        "stream": false,
        "title": null,
        "conversation_id": null,
        "turn_id": null,
        "city": null,
        "region": null,
        "country": null,
        "country_code": null,
        "timezone": null,
        "images": null,
        "files": [],
        "create_new": true
      },
      "expected": "Use the current notes: BLUE-CANDLE USD 18.00, stock 12; AMBER-CANDLE USD 24.00, stock 7. One blue plus two amber units gives three items, subtotal USD 66.00, shipping USD 0.00 and total USD 66.00. Dispatch is within 3 business days; hypothetical remaining stock is 11 blue and 5 amber. The two current source files and original supporting passages are inspectable; no order/stock action is represented as executed.",
      "passConditions": [
        "Every stated current unit price and starting stock matches the 2026-09-30 inventory file: BLUE-CANDLE USD 18.00 and 12 units; AMBER-CANDLE USD 24.00 and 7 units. Archived USD 15.00/20.00 values are never labeled current.",
        "The arithmetic is exact to currency cents and integer stock units: quantity 3, item subtotal USD 66.00, shipping USD 0.00, order total USD 66.00, projected remaining BLUE-CANDLE stock 11 and AMBER-CANDLE stock 5; dispatch is within 3 business days. Projected stock is labeled hypothetical, not an executed reservation.",
        "The native response exposes both actual current filenames in its retained references, and quoted inventory/dispatch evidence agrees with the original UTF-8 source passages. Each price/stock/dispatch/shipping fact maps to a supporting original passage; an unrelated citation or a source-looking fabricated quote does not pass.",
        "The full native POST /api/chat request and unedited response JSON are retained; the request has the frozen body with no attachments, stream=false and create_new=true. Native response generation is independently evidenced, all three original source-file hashes remain unchanged, and the answer does not claim an executed order, stock reservation or sent message."
      ],
      "failureConditions": [
        "Any exact fact, arithmetic, current-versus-archive distinction, source-passage grounding or native evidence condition fails.",
        "Changing the frozen source text, query, expected values or acceptance conditions after observing a model result, supplying a reference answer to the model, or substituting a direct model/RAG wrapper for full native Khoj does not satisfy this case."
      ]
    },
    {
      "id": "khoj-proposed-boundary",
      "title": "Superseded policy and missing delivery/refund facts",
      "input": "The same three frozen Markdown files in a separate new native conversation over the same fresh task-owned corpus. The 2025 document contains explicit obsolete promises, while the current policy explicitly does not supply an arrival date or refund-processing deadline.",
      "instruction": "/notes Today is 2026-10-02. Our archive says dispatch takes 1 business day and free shipping starts at USD 40.00. Are those the current rules? Explain the current dispatch and free-shipping policy using the dated original notes, clearly mark the archive as superseded, and quote your evidence. What exact date will an eligible domestic order arrive, and what is the refund-processing deadline? If the supplied notes do not establish either answer, state that each is unknown rather than inventing a promise. Do not search the web, make an order or send a message.",
      "nativeRequestBody": {
        "q": "/notes Today is 2026-10-02. Our archive says dispatch takes 1 business day and free shipping starts at USD 40.00. Are those the current rules? Explain the current dispatch and free-shipping policy using the dated original notes, clearly mark the archive as superseded, and quote your evidence. What exact date will an eligible domestic order arrive, and what is the refund-processing deadline? If the supplied notes do not establish either answer, state that each is unknown rather than inventing a promise. Do not search the web, make an order or send a message.",
        "n": 7,
        "d": null,
        "stream": false,
        "title": null,
        "conversation_id": null,
        "turn_id": null,
        "city": null,
        "region": null,
        "country": null,
        "country_code": null,
        "timezone": null,
        "images": null,
        "files": [],
        "create_new": true
      },
      "expected": "Identify the 2025 dispatch/free-shipping values as superseded and report current dispatch within 3 business days and the USD 60.00 free-shipping threshold. Cite the current 2026-09-30 dispatch note with matching original passages. Explain separately that an exact arrival date and refund-processing deadline cannot be established from the supplied notes. Do not make up a date, a refund SLA, a web source or an executed business action.",
      "passConditions": [
        "The answer labels archived 1-business-day dispatch and USD 40.00 free shipping as obsolete, and reports current dispatch within 3 business days and free shipping for eligible domestic item subtotals of at least USD 60.00.",
        "The exact arrival date and refund-processing deadline are each explicitly described as unknown/not supplied by the notes. Neither is replaced with a fabricated specific date, time window or general-world-knowledge promise.",
        "The retained native reference identifies juniper-dispatch-2026-09-30.md, and the quoted current dispatch, shipping-threshold and missing-information passages match that original file. Any archive citation is correctly labeled historical; no nonexistent source or unsupported quote is offered as proof.",
        "The complete frozen native POST /api/chat request and unedited response JSON are retained in a new conversation with no attachments and no /online or /research command. Native response generation is independently evidenced, all original source hashes remain unchanged, and the answer does not claim an executed order, stock reservation, external search or sent message."
      ],
      "failureConditions": [
        "Any current-policy distinction, missing-fact disclosure, exact citation grounding or native evidence condition fails.",
        "Changing the model, source, query, reference outcome or acceptance conditions after observing output requires a separately identified follow-up case; a local setup or search-only success is not an executed answer-quality case."
      ]
    }
  ]
}
