# Evidence and provenance

> Pinned 0.18.0 DMG and app.asar SHA-256 identities, evidence-only UI rule, and production bindings that must resolve into source/.

- Repository: sashimikun/grok-bot-0.18-reconstructed
- GitHub: https://github.com/sashimikun/grok-bot-0.18-reconstructed
- Human docs: https://grok-wiki.com/public/docs/sashimikun-grok-bot-0-18-reconstructed-c774cc9a5c15
- Complete Markdown: https://grok-wiki.com/public/docs/sashimikun-grok-bot-0-18-reconstructed-c774cc9a5c15/llms-full.txt

## Source Files

- `PROVENANCE.md`
- `NOTICE.md`
- `frontend/README.md`
- `manifests/reconstruction/electron-main-production-bindings-manifest.json`
- `tests/publication-bootstrap.test.mjs`
- `scripts/audit-ui-provenance.mjs`

---

---
title: "Evidence and provenance"
description: "Pinned 0.18.0 DMG and app.asar SHA-256 identities, evidence-only UI rule, and production bindings that must resolve into source/."
---

The reconstruction treats the public Grok Bot **0.18.0** macOS arm64 release as an immutable product specification. `scripts/lib/config.mjs` pins `upstreamVersion` to `0.18.0`, `dmgSha256` to `a253ccd8aab01e083f9812a0264354c5034d8ba7f0610bbb557e82ae77d203eb`, and `upstreamAsarSha256` to `6665408168466f9cacc6087e917890c17f59d2e2e9c2404a5c4a59ad79c1de58`. Bootstrap, hydration, packaging, and `npm run verify` reject any other DMG or `app.asar` identity. Recovered UI and Electron-main production bindings may express only behavior that those artifacts still contain.

## Pinned 0.18.0 identities

| Identity | Value |
| --- | --- |
| Product | Grok Bot |
| Version | `0.18.0` |
| Upstream bundle ID | `com.anysphere.sand` |
| Reconstructed bundle ID | `com.anysphere.sand.reconstructed` |
| Electron | `42.1.0` |
| macOS DMG | `https://downloads.cursor.com/grokbot/stable/darwin-arm64/0.18.0/Grok_Bot_0.18.0.dmg` |
| DMG SHA-256 | `a253ccd8aab01e083f9812a0264354c5034d8ba7f0610bbb557e82ae77d203eb` |
| DMG size | `155793020` bytes |
| Original `app.asar` SHA-256 | `6665408168466f9cacc6087e917890c17f59d2e2e9c2404a5c4a59ad79c1de58` |
| Windows installer | `https://downloads.cursor.com/grokbot/stable/win32-x64/0.18.0/Grok_Bot_0.18.0_Setup.exe` |
| Windows SHA-256 | `464079a15ef5fa8b61ccea8fffcc78f63cfcf6df65fb0ad5e725d8b95f7e437e` |
| Windows size | `125825552` bytes |
| Preservation manifest | `research-archives/original/0.18.0/artifacts.json` (`schemaVersion` `1`) |

The original application was Developer ID signed and notarized by Anysphere Incorporated. Reconstructed builds use `com.anysphere.sand.reconstructed`, are ad-hoc signed only, and do not retain or claim the upstream signature.

Git LFS preserves both installers. `artifacts.json` is the machine-readable inventory; `SHA256SUMS` is the `shasum -c` companion.

:::files
research-archives/original/0.18.0/
├── artifacts.json
├── SHA256SUMS
├── macos-arm64/Grok_Bot_0.18.0.dmg
└── windows-x64/Grok_Bot_0.18.0_Setup.exe
:::

```sh
git lfs install
git lfs pull
(cd research-archives/original/0.18.0 && shasum -a 256 -c SHA256SUMS)
```

<Warning>
No upstream source-code license is implied. Do not present reconstructed material as original source or an official build. The LFS installers remain subject to their own terms and are not covered by any license applied to reconstructed code. Complete an independent rights review before public redistribution.
</Warning>

## Provenance layers

Checksums, UI catalogs, and production bindings are separate fail-closed layers. A green typecheck does not substitute for any of them.

```mermaid
flowchart TB
  subgraph installers [Pinned public installers]
    DMG["Grok_Bot_0.18.0.dmg<br/>dmgSha256"]
    EXE["Grok_Bot_0.18.0_Setup.exe<br/>artifacts.json"]
  end
  subgraph payload [Hydrated immutable payload]
    ASAR["Contents/Resources/app.asar<br/>upstreamAsarSha256"]
    DIST["src/app/dist<br/>electron-main / host / renderer"]
  end
  subgraph reviewed [Reviewed reconstruction]
    SOURCE["source/"]
    FRONTEND["frontend/"]
    MANIFEST["manifests/reconstruction/<br/>electron-main-production-bindings-manifest.json"]
    CATALOG["frontend/manifests/<br/>ui-evidence-anchors.json"]
  end
  DMG --> ASAR
  ASAR --> DIST
  DIST -->|"artifactAnchor needles"| MANIFEST
  DIST -->|"immutable renderer claims"| CATALOG
  MANIFEST -->|"module must resolve under source/"| SOURCE
  CATALOG -->|"exact UI claim in cleanPath"| FRONTEND
```

## Bootstrap and hydration gates

`npm run bootstrap` (`scripts/bootstrap-runtime.mjs`) locates a 0.18.0 app, then hydrates ignored `src/app/dist` from its `app.asar`.

<Steps>
<Step title="Resolve a 0.18.0 app">
Order: `GROK_BOT_018_APP` (copied into `.cache/runtime/Grok Bot.app`), then the cached app, then the LFS DMG, then `dmgUrl`. `validateRuntimeApp` requires `CFBundleShortVersionString` `0.18.0`, `Contents/MacOS/Grok Bot`, and `Contents/Resources/app.asar.unpacked`.
</Step>
<Step title="Verify the DMG">
Cached and downloaded DMGs must equal `dmgSha256`. An archived LFS pointer or drifted file fails with `Archived DMG checksum mismatch: expected a253ccd8…`. A public download that does not match is deleted as `*.partial` and fails with `DMG checksum mismatch`.
</Step>
<Step title="Hydrate src/app/dist">
`hydrateSourcePayloadFromAsar` hashes the ASAR against `upstreamAsarSha256` (overrideable only in tests via `expectedSha256`). Mismatch throws `Upstream app.asar checksum mismatch`. The archive must contain `dist/electron-main/main.cjs`, `dist/host/host-main.cjs`, and `dist/renderer/index.html` before `dist/` is copied to `src/app/dist`.
</Step>
</Steps>

<ParamField body="GROK_BOT_018_APP" type="string">
Absolute path to an installed 0.18.0 `Grok Bot.app`. Version mismatch aborts before hydration.
</ParamField>

<ParamField body="GROK_BOT_ELECTRON_MAIN_BINDINGS_MANIFEST" type="string">
Optional schemaVersion 1 binding manifest. Defaults to `manifests/reconstruction/electron-main-production-bindings-manifest.json` when that file exists. A residual-only manifest cannot override the sixteen reviewed `source/` providers.
</ParamField>

Success log:

```text
Checksum-pinned source payload ready: <repo>/src/app/dist (6665408168466f9cacc6087e917890c17f59d2e2e9c2404a5c4a59ad79c1de58)
```

Packaged artifact-renderer provenance must also carry `upstreamAppAsarSha256` equal to that digest. `npm run verify` rejects a drifted provenance identity.

## Evidence-only reconstruction rule

The immutable release is the product specification. Recovered source may express only behavior supported by at least one inspectable artifact anchor:

- emitted code or source-path markers
- extracted capsules / source maps
- shipped strings, assets, or CSS
- renderer DOM signatures
- IPC / RPC contracts
- repeatable observation of the shipped runtime

The rule is strict for the renderer. Do not invent or redesign a screen, route, control, label, selector, state, or interaction to fill an evidence gap. A clean abstraction or test seam is acceptable only when it preserves artifact-derived semantics and does not add product behavior. When evidence is incomplete, record the uncertainty and leave the feature unmapped or evidence-only.

Passing `npm run typecheck` / `npm run frontend:build` is not proof of provenance. Speculative UI is a release-blocking defect.

The shipped renderer is optimized production bundles, not authored frontend source or source maps. `frontend/` is a partial evidence-backed reconstruction and Vite design workspace. Packaged builds retain the pinned renderer and apply only a narrow, hash-recorded Settings Router transform unless `GROK_BOT_RENDERER_SOURCE` overrides the renderer source.

Comments beginning with `@evidence` (or `@artifact-evidence`) are provenance annotations, not imports. `scripts/audit-ui-provenance.mjs` accepts annotation paths only under:

- `src/app/`
- `recovered/frontend/`
- `recovered/source-capsules/`
- `frontend/manifests/`

## UI evidence catalog and auditor

`frontend/manifests/ui-evidence-anchors.json` is `schemaVersion` `1` with an `entries` array. Each entry names one clean file and exact anchors.

Allowed catalog `category` values: `visible-string`, `selector`, `route`, `dom-signature`, `asset`.

Each anchor must:

- use an exact value (no wildcards, newlines, or prose such as `see shipped`)
- point `artifact` at immutable `src/app/` evidence (not the clean file or the catalog)
- occur at the declared artifact location
- match an extracted UI claim in the named `cleanPath`
- if `registry` is set, name a reviewed registry: `recovered/frontend/reports/features.json`, `frontend/manifests/semantic-symbols.json`, `frontend/manifests/component-names.json`, `frontend/manifests/conversation-evidence.json`, or `frontend/src/production/evidence.ts`

Auditor inputs (`UI_AUDIT_INPUTS`):

| Role | Path |
| --- | --- |
| Anchor catalog | `frontend/manifests/ui-evidence-anchors.json` |
| Clean roots | `frontend/src/recovered`, `frontend/src/production`, plus `frontend/src/main.tsx` |
| Immutable renderer | `src/app/dist/renderer` |
| Production evidence registry | `frontend/src/production/evidence.ts` |
| Optional recovered trees | `recovered/source-capsules/manifest.json`, `recovered/frontend/app`, `recovery/full-app-coverage.json` |

```sh
node scripts/audit-ui-provenance.mjs [--json] [--include-audits] [--include-dev] [--source=substring] [--limit=N] [--fail-on=high|medium]
```

`--fail-on=high` exits `1` when `summary.high > 0`. `--fail-on=medium` also fails on medium findings.

High-severity codes include `missing-module-provenance`, `unanchored-visible-string`, `unanchored-route`, `invalid-evidence-annotation`, `catalog-anchor-not-in-artifact`, `catalog-self-or-nonimmutable-reference`, and `catalog-vague-anchor`. Distinctive reconstructed selectors matching `/^\.(?:sand-|grok-|recovered-)/` are high; other unanchored selectors are medium.

When a full recovered workspace is present, `scripts/renderer-production-build.mjs` requires `ui.summary.catalogErrors === 0` and `ui.summary.findings === 0` plus renderer closure covering **5** composed feature surfaces and **11** shipped routes. On the publication tree it instead validates the checked-in catalog against the closure report and omits `recovered/` registries.

`npm run verify` still requires at least **1,000** surviving `// src/` evidence source markers across hydrated `dist/electron-main/main.cjs` and `dist/host/host-main.cjs`.

## Electron-main production bindings

Clean Electron-main activation is fail-closed on sixteen slots. The checked-in map is `manifests/reconstruction/electron-main-production-bindings-manifest.json` (`schemaVersion` `1`).

`tests/publication-bootstrap.test.mjs` requires every `module` to match `^\.\./\.\./source/` relative to that manifest directory, resolve under repository `source/`, and exist on disk.

Activation (`scripts/electron-main-production-activation.mjs`) additionally:

- requires `classification` `generated-source` | `third-party` | `native` and `access` `call` | `value`
- requires every `artifactAnchor.artifact` to be `src/app/dist/electron-main/main.cjs` with an integer `line` and the exact needle from `electronMainProductionBindingEvidence`
- forbids generated-source modules under `src/app/`, `recovered/source-capsules/`, `dist/deps/`, and `.build/app/`
- validates the export with an esbuild import of the named symbol
- writes packaged provenance to `dist/electron-main-production-bindings.json`

A full sixteen-slot manifest is accepted for compatibility. A partial residual manifest must not overlap the reviewed inventory. Missing slots return `incomplete-evidence-derived-manifest`; there is no default or native fallback.

| `path` | `export` | `access` | Needle |
| --- | --- | --- | --- |
| `adapters.secureStorage` | `createElectronProductionSecureStorageBinding` | `call` | `initializeSecureStorage();` |
| `adapters.settings` | `createElectronProductionSettingsBinding` | `call` | `var sandSettingsStore = new SandSettingsStore(` |
| `adapters.attachmentGateway` | `createElectronProductionAttachmentGatewayBinding` | `call` | `attachments: createAttachmentEdgePort({` |
| `adapters.mainRpc` | `createElectronProductionMainRpcBinding` | `call` | `const mainEdge = serveMainEdge({` |
| `adapters.updaterInstaller` | `createElectronProductionUpdaterInstallerBinding` | `call` | `updateService = createUpdateServiceWiring({` |
| `adapters.mediaProtocol` | `createElectronProductionMediaProtocolBinding` | `call` | `registerSandMediaProtocol();` |
| `adapters.accountOAuth` | `createElectronProductionAccountOAuthBinding` | `call` | `var cursorAuthWiring = createCursorAuthWiring({` |
| `adapters.experiments` | `createElectronProductionExperimentsBinding` | `call` | `var experimentsRuntime = createExperimentsRuntime({` |
| `adapters.mcpOAuth` | `createProductionMcpOAuthAdapter` | `call` | `var mcpRuntime = createMcpRuntime({` |
| `adapters.telemetry` | `createElectronProductionTelemetryBinding` | `call` | `desktopTelemetry = await SandDesktopStructuredLogTelemetry.create({` |
| `adapters.notifications` | `createElectronProductionNotificationsBinding` | `call` | `const osNotificationManager = new SandOsNotificationManager({` |
| `adapters.coordinator` | `createElectronProductionCoordinatorBinding` | `value` | `const createCoordinatorSession = () => createCoordinatorRuntime({` |
| `adapters.ipc` | `createElectronProductionIpcBinding` | `call` | `registerSecretsIpc({` |
| `startup` | `createElectronProductionStartupBinding` | `call` | `var desktopStartup = createDesktopStartupTracker({` |
| `parseAllowedExternalUrl` | `parseAllowedExternalUrl` | `value` | `function parseAllowedExternalUrl(value)` |
| `reportFailure` | `reportDesktopEdgeFailure` | `value` | `function reportDesktopEdgeFailure(area, leg, error6)` |

`npm run verify` requires packaged `dist/electron-main-production-bindings.json` (and the host analog) to have `status` `validated-clean-source`, empty `executableGraph.forbiddenInputs` / `forbiddenOutputReferences`, and no binding `module` containing `src/app`, `dist/deps`, or `recovered/source-capsules`.

Hydration checksum test: `hydrateSourcePayloadFromAsar(..., { expectedSha256: "0".repeat(64) })` must reject with `/checksum mismatch/`.

## Rights and publication

`NOTICE.md` states this tree is an unofficial reconstruction, not affiliated with or endorsed by Anysphere, Cursor, xAI, or SpaceX. Absence of the original binary payload from Git does not by itself make the reconstruction safe to redistribute. `npm run publication:check` is the archive/init/add tree gate before a public remote; it does not replace a rights review.

## Next

<CardGroup>
<Card title="Reconstruction boundary" href="/reconstruction-boundary">
Compiled `source/` runtimes, checksum-pinned shipped renderer, and `com.anysphere.sand.reconstructed`.
</Card>
<Card title="Bootstrap the pinned runtime" href="/bootstrap-pinned-runtime">
`npm run bootstrap` order, DMG/`app.asar` SHA-256 checks, and `src/app/dist` hydration.
</Card>
<Card title="Preserve original installers" href="/preserve-original-installers">
Git LFS 0.18.0 identities, `artifacts.json` schemaVersion 1, and `shasum -c SHA256SUMS`.
</Card>
<Card title="Work on the frontend reconstruction" href="/edit-frontend-workspace">
`frontend/` as a Vite design workspace; packaged UI stays the patched shipped renderer.
</Card>
<Card title="Verify and smoke" href="/verify-and-smoke">
Required ASAR paths, evidence markers, and packaged binding provenance.
</Card>
<Card title="Publication export" href="/publication-export">
Tree equality, LFS installer push, and NOTICE/rights review before a public remote.
</Card>
</CardGroup>
