# Ocean6 local engineering reference v0.2

Deterministic text retrieval. No LLM, remote node, distributed network or settlement.
Use Python 3.9+ with no external dependencies. Run from the extracted directory:

```sh
python3 reference_runtime.py run task.json result.json receipt.json
python3 reference_runtime.py verify task.json result.json receipt.json
python3 test_reference.py
```

Expected: LOCAL RUN COMPLETE, then PASS, then passing tests.
Change the result: verify should exit nonzero with REPLAY_MISMATCH.
Change the task file bytes only (e.g. add a trailing newline): verify should fail with TASK_DIGEST_MISMATCH.
The run command overwrites the specified result and receipt paths. Use distinct paths.

To compare a browser-exported task and output:

```sh
python3 reference_runtime.py compare task.json browser-result.json
```

Optional JavaScript execution (Node.js with ES modules):

```sh
node --input-type=module -e 'import fs from "node:fs"; import {execute} from "./reference-runtime.mjs"; console.log(JSON.stringify(execute(JSON.parse(fs.readFileSync("task.json","utf8"))),null,2))'
```

The browser compares parsed result structure against local replay, not cryptographic digests.
Python verify hashes the exact original UTF-8 task/result file bytes and independently replays the task.
JSON field order and whitespace need not match for semantic replay, but receipt digests bind exact bytes.
JSON must have unique field names. Python rejects duplicate keys; the browser editor uses native JSON.parse, which keeps the last occurrence.
Do not use duplicate keys for cross-runtime comparison. The runtime performs explicit validation, not a general JSON Schema engine.

ASCII A-Z is folded to lowercase; other scripts match literally. CRLF/CR become LF for line splitting.
Score counts distinct matched terms. Equal scores sort by original one-based line number.
See Engineering-Spec-EN.md / Engineering-Spec-CN.md for limits and network design proposals.

Receipts and timestamps are unsigned local claims. A forged, self-consistent bundle cannot establish executor identity.
SHA256SUMS.txt checks changes relative to this release manifest, not publisher authenticity.
Neither the reference nor successful tests demonstrate production security, GPU capacity or network performance.
capability-template.json is an empty design template; benchmark-template.csv contains headers only, not measured results.
