Hand-patches to the protected runtime are silently discarded on upgrade, with no supported override
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- backend, desktop, developer-experience
Direzione di ricerca
Start with the runtime integrity code around nativeRuntimeVerified() and the packaged files node-services/dist/main.js, files.json, and verified.json. Trace how STEP_TIMEOUT_MS and MODEL_CALL_MAX_WAIT_MS are defined and where startup verification and upgrade downloads report failures. Done means configurable limits have documented defaults, verification errors identify the mismatched file and digests, and upgrade or override behavior is covered by tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The question
I had to patch the shipping runtime twice in two days to keep a local install working — once to fix wiki page rendering, once to raise two hard 5-minute model-call ceilings (see #881). Both times the fix worked, and both times I had to edit node-services/dist/main.js by hand.
Will these patches survive a version upgrade? From reading the integrity layer: no, and there is no supported alternative.
What the integrity check actually does
.simplexai-runtime/offline/ carries:
files.json—{schema: 1, target: "darwin-arm64", sourceCommit, sourceArchiveSha256, files: {<path>: {bytes, sha256}}}verified.json—{"files": "<sha256 of files.json>"}
with four protected entries (web/static-host.mjs, web/dist/index.html, node-services/dist/main.js, node-services/dist/supervisor.js).
nativeRuntimeVerified() is effectively verifiedFor(dir) === manifest.sha256, so the two mechanisms are:
- every protected file must match its
sha256infiles.json; verified.jsonmust hash to thefiles.jsonit belongs to.
Editing dist/main.js therefore breaks (1) and the runtime refuses to start. I re-hashed the file, rewrote its entry in files.json (2-space JSON — a plain string replace on a minified form silently misses it), recomputed the files.json digest, and updated verified.json. That passes verification today, but the next upgrade re-downloads offline/ from sourceArchiveSha256 and my work is gone — and because the edit is unversioned, nothing in the UI or logs tells the user their install is now diverging from the release.
Why this matters more than it sounds
The two things I patched are both cases where a local install cannot work without a code change:
- A rendering bug in
renderWikiPageproduced broken wiki pages for every published generation. No config could work around it. - Two constants —
STEP_TIMEOUT_MS = 5 * 60_000andMODEL_CALL_MAX_WAIT_MS = 3e5— are not reachable from any config file or environment variable. When a day's evidence pack outgrows them, background reports stop existing with no user-visible error (#881).
So the only lever a user has today is to break the checksum, which is exactly what the checksum exists to prevent.
What I would ask for
- Say it out loud. If hand-patches are unsupported and wiped on upgrade, the verification failure should name the file and the expected/actual digest, and the UI should show "this install has local modifications" rather than a generic startup failure.
- A supported override for the limits. Timeouts, retry counts and evidence-pack size are operational tunables, not security boundaries — they belong in config (with the defaults above), not in compiled constants.
- A local overlay, if a real code fix is ever needed. Something like
offline/local-overrides/that is checked in addition to the manifest rather than instead of it, so a user can carry a fix through an upgrade and a maintainer can ask for it verbatim in a bug report. - A visible upgrade path for patches. If a patched install upgrades, at minimum log which protected files differed and were replaced, so the user knows what they lost.
Reproducing the current state
D=~/.simplexai/desktop/source/<sourceCommit>/.simplexai-runtime/offline
python3 - <<'PY'
import hashlib, json, os
d = os.environ['D']
m = json.load(open(f'{d}/files.json'))
for p, e in m['files'].items():
actual = hashlib.sha256(open(f'{d}/{p}','rb').read()).hexdigest()
print(p, 'OK' if actual == e['sha256'] else 'MODIFIED', actual[:16])
print('manifest sha256', hashlib.sha256(open(f'{d}/files.json','rb').read()).hexdigest()[:16])
print('verified.json ', open(f'{d}/verified.json').read())
PY
Run it on a clean install and after any local edit; the difference is the state I am describing.
Environment
macOS darwin-arm64, runtime sourceCommit 43c02e4bf47ab271a4881a00906e4fabc49fc6ec, node v26.5.0. Related: #881 (the two 5-minute gates and the stuck scheduler).
- Lingua principale
- TypeScript
- Stelle
- 3.8k
- Fork
- 360
- Merge medio
- 8h 10m
- PR unite (30g)
- 540
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di simplexai-labs/linger
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
simplexai-labs/linger#904 ·
I maintainer di solito rispondono entro 1 giorno
-
Local model JIT load waits ~22 s for a concurrency probe that always ends unmeasured and is never cachedForse già presa @oldwinter53 l’ha presa oggi. Apertabug
simplexai-labs/linger#896 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feat(agents): let an Agent choose runtime, model and reasoning effort when it creates an AgentAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
simplexai-labs/linger#888 ·
I maintainer di solito rispondono entro 1 giorno
-
Daily memory report silently never runs: 5-minute step ceiling plus a stuck in-memory #scheduled setAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
simplexai-labs/linger#881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
mac 9B 模型下载失败Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
simplexai-labs/linger#880 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di simplexai-labs/linger
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MetaMask/eth-phishing-detect#317371 ·
I maintainer di solito rispondono entro 1 giorno
-
android:player ios:player
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
erkamyaman/rust-anything#963 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
I maintainer di solito rispondono entro 1 giorno
-
bug(worker): detector run is marked failed and never retried when span download failsForse già presa @jagrutgarg l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
traceroot-ai/traceroot#3434 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno