Skip to content

Commit c507dac

Browse files
committed
v59: retain dashboard evidence, recover goal work and commission verified future labels
1 parent 082b5a7 commit c507dac

18 files changed

Lines changed: 558 additions & 19 deletions

‎SYNTA_RECOVERY.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Synta recovery, v59
2+
3+
This fixes the uploaded dashboard snapshot's demonstrated failures, not a claim
4+
that every strategy is profitable or every candidate must be accepted.
5+
6+
- Aggregate timeout retains only the latest same-run report, with explicit stale
7+
state and timestamp. New-run optimizer counters never inherit old-run values.
8+
- Verified goal/plans and worker file snapshots remain readable independently.
9+
Missing ledger/blocker data is unavailable, not an empty ledger or no blockers.
10+
- Dedicated report entry point avoids inference CLI initialization. Goal status
11+
uses a bounded read-only SQLite snapshot, without competing writer transactions.
12+
Failure to collect goal metrics does not discard other mission evidence.
13+
- Public tool receipts show actual state/ID/value/process exit code. Desktop
14+
completion means process execution, with task outcome explicitly unverified.
15+
Nonzero desktop exit is failed, not completed. The known placeholder/pass
16+
simulation pattern is refused before queuing; other code still needs validation.
17+
- Upgrade archives UI-dominated income plans and restores observable financial
18+
research tasks while retaining the operator goal. Model researchers cannot
19+
replace financial plans with UI-only work. Explicit operator UI tasks stay allowed.
20+
- Financial missions collect up to two public reference series per observer tick,
21+
rotated across eight separate Coinbase spot-price paths. Uniform controller
22+
forecasts are precommitted for 300 seconds and resolved using independently
23+
fetched future prices. They are labelled commissioning baselines, not model
24+
discoveries, actionable signals or profit. Source outages create failure receipts,
25+
never fabricated prices or labels. Other goals need their own measurable adapters.
26+
- Model forecasts and observation discovery remain available. The independent
27+
reference loop supplies task labels even when a model makes invalid tool calls.
28+
Existing source-disjoint CPU/master admission, retention and independent quality
29+
gates remain mandatory. Insufficient/division-inadequate labels, unavailable
30+
workers, fees or failed candidate gates remain explicit legitimate blockers.
31+
32+
No change executes real orders, purchases, paid APIs or account creation. It does
33+
not certify the historical placeholder scalping/arbitrage scripts. Production
34+
execution and measured progress must be checked after installation on Debian.

‎SYNTA_REQUIREMENTS_AUDIT.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Synta: requirement and verification audit, v58
1+
# Synta: requirement and verification audit, v59
22

33
This audits the visible conversation. "Implemented" means code exists and the
44
listed checks pass, not that it has run successfully on the operator's computers.
@@ -63,3 +63,10 @@ proposals and compatible identity-initialized residual growth. Existing queued
6363
master trials execute them in isolation. Activation additionally requires verified
6464
goal outcomes and strict measured task improvement. Native GGUF architecture is
6565
not reshaped in place. See `SYNTA_MORPHOLOGY.md` for the executable contract.
66+
67+
## v59 runtime recovery
68+
69+
See `SYNTA_RECOVERY.md`: same-run stale-report preservation, independent verified
70+
goal reads, read-only goal-status SQLite, actual process/forecast receipts, archived
71+
UI-plan recovery and independent forward-only financial reference labels. These
72+
labels commission supervised task data, not model skill or profitable strategies.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "rlms"
33
authors = [
44
{name = "Alex Zhang", email = "altzhang@mit.edu"},
55
]
6-
version = "0.1.3+v100.58"
6+
version = "0.1.3+v100.59"
77
description = "Recursive Language Models."
88
readme = "README.md"
99
license = "MIT"

‎rlm/v100/background_observer.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ def tick(root: Path) -> None:
2020
ActivityLog(root, "controller", "goal-learning").write(
2121
"errors", "goal-observer-failed", {"detail": str(error)[:400]}
2222
)
23+
from rlm.v100.goal_observer import tick as reference_tick
24+
25+
try:
26+
reference_tick(root)
27+
except (OSError, ValueError, RuntimeError, requests.RequestException) as error:
28+
ActivityLog(root, "controller", "goal-observer").write(
29+
"errors", "reference-collection-failed", {"detail": str(error)[:400]}
30+
)
2331
compute_tick(root)
32+
from rlm.v100.goal_learning import status as goal_status
33+
34+
atomic_json(
35+
root / "research/goal-learning/status.json", {**goal_status(root), "updated": time.time()}
36+
)
2437
ledger = root / "research/paper/ledger.sqlite3"
2538
if not ledger.exists():
2639
return

‎rlm/v100/dashboard_layout.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@
8585
for(const e of result.events||[]){const d=document.createElement('details'),title=document.createElement('summary'),body=document.createElement('pre');title.textContent=[e.time,e.branch,e.actor,e.kind].filter(Boolean).join(' | ');body.textContent=JSON.stringify({context:e.context,payload:e.payload,id:e.id},null,2);d.append(title,body);rows.append(d)}cursor=result.next_cursor;status.textContent=`${rows.children.length} events shown | ${cursor} / ${result.archive_bytes||0} archive bytes`;button.textContent=result.has_more?'Load next 100 actions':'Check for new actions';}catch(error){status.textContent='Archive unavailable: '+error.message}finally{button.disabled=false}}
8686
button.onclick=()=>load();select.onchange=()=>load(true);
8787
}
88-
function learningPanel(data){rememberDisclosures();const p=panel('goal-learning-panel','Goal-directed ML pipeline',$('plan-panel'));let body=$('goal-learning-view');if(!body){body=document.createElement('div');body.id='goal-learning-view';p.append(body)}body.replaceChildren();const evidence=data.report?.mission_evidence||{},g=evidence.goal_learning||{};textField(body,'Active goal ID',g.goal_id||'No goal recorded');for(const [k,v] of Object.entries(g.learning_task||{}))textField(body,k,v);textField(body,'Recent forecasts',fmt(g.forecasts?.length));textField(body,'Recent resolved forecasts',g.recent_resolved);textField(body,'Recent Brier score',g.recent_brier);textField(body,'Admitted training examples',g.training_admission?.admitted);textField(body,'Confirmed optimizer updates',fmt(evidence.optimizer_updates_observed));textField(body,'Accepted weight updates',fmt(evidence.accepted_weight_updates_this_run));detailsField(body,'Training admission evidence',JSON.stringify(g.training_admission||{}),'goal-admission');const dispatch=g.owned_cpu_dispatch||{};textField(body,'Owned CPU dispatch',dispatch.state||'Not observed');textField(body,'Dispatch blocker',dispatch.reason);for(const branch of dispatch.branches||[])textField(body,'CPU trial',`${branch.id||'Not allocated'} | ${branch.state} | ${branch.reason||branch.scope||''}`);detailsField(body,'Owned CPU provenance and receipts',JSON.stringify(dispatch),'goal-compute');restoreDisclosures()}
88+
function learningPanel(data){rememberDisclosures();const p=panel('goal-learning-panel','Goal-directed ML pipeline',$('plan-panel'));let body=$('goal-learning-view');if(!body){body=document.createElement('div');body.id='goal-learning-view';p.append(body)}body.replaceChildren();const evidence=data.report?.mission_evidence||{},g=evidence.goal_learning||{};textField(body,'Active goal ID',g.goal_id||(data.report?.plans?.long?.id?'Goal metrics unavailable':'Goal status unavailable'));for(const [k,v] of Object.entries(g.learning_task||{}))textField(body,k,v);textField(body,'Recent forecasts',fmt(g.forecasts?.length));textField(body,'Recent resolved forecasts',g.recent_resolved);textField(body,'Recent Brier score',g.recent_brier);textField(body,'Admitted training examples',g.training_admission?.admitted);textField(body,'Confirmed optimizer updates',fmt(evidence.optimizer_updates_observed));textField(body,'Accepted weight updates',fmt(evidence.accepted_weight_updates_this_run));detailsField(body,'Training admission evidence',JSON.stringify(g.training_admission||{}),'goal-admission');textField(body,'Verified total outcomes',g.resolved_total);detailsField(body,'Independent observation pipeline',JSON.stringify(g.observer||{}),'goal-observer');const dispatch=g.owned_cpu_dispatch||{};textField(body,'Owned CPU dispatch',dispatch.state||'Not observed');textField(body,'Dispatch blocker',dispatch.reason);for(const branch of dispatch.branches||[])textField(body,'CPU trial',`${branch.id||'Not allocated'} | ${branch.state} | ${branch.reason||branch.scope||''}`);detailsField(body,'Owned CPU provenance and receipts',JSON.stringify(dispatch),'goal-compute');restoreDisclosures()}
8989
function svg(tag,attrs,text){let node=document.createElementNS('http://www.w3.org/2000/svg',tag);for(const [key,val] of Object.entries(attrs))node.setAttribute(key,val);if(text!==undefined)node.textContent=text;return node}
9090
function render(data){if(latestInference&&inferenceStamp(latestInference)>=inferenceStamp(data.live))data=mergeInference(data,latestInference);latestSnapshot=data;const m=data.mission||{},r=data.report||{},ev=(m.state?.phase==='official-public-baseline'?r.mission_evidence?.official_benchmark:null)||m.evaluation||{},learn=m.learning||{},gpu=data.gpu||{};
9191
if(data.layout?.active_sha256&&layoutVersion!==data.layout.active_sha256){location.reload();return}$('layout').textContent='HTML mastera: /workspace/dashboard/index.html | '+(data.layout?.state||'oczekiwanie')+(data.layout?.error?' | '+data.layout.error:'');
92-
$('fresh').textContent='Zebrano: '+new Date(data.collected_at*1000).toLocaleString()+' | Raport zbierany co 20 s | Przebieg: '+fmt(m.run);
92+
$('fresh').textContent='Zebrano: '+new Date(data.collected_at*1000).toLocaleString()+' | Raport zbierany co 20 s | Przebieg: '+fmt(m.run)+(data.report_freshness?.state==='stale'?' | STALE REPORT: '+fmt(data.report_freshness.updated_at):'');
9393
workView(data);learningPanel(data);archivePanel();$('warning').textContent=(data.errors||[]).join('\n');$('cards').replaceChildren();card('Misja',m.running?'działa':'zatrzymana');card('Faza',m.state?.phase);card('Cykle uczenia',learn.completed_cycles);card('Zaakceptowane aktualizacje wag',r.accepted_weight_updates_this_run);card('Potwierdzone kroki optymalizatora',r.mission_evidence?.optimizer_updates_observed);card('Kontekst',m.state?.context_window);card('GPU - wykorzystanie',gpu.utilization===undefined?null:gpu.utilization+'%');card('VRAM zajęty / razem',gpu.memory_used===undefined?null:gpu.memory_used+' / '+gpu.memory_total+' MiB');card('GPU - temperatura / moc',gpu.temperature===undefined?null:gpu.temperature+' °C / '+gpu.power+' W');
9494
$('evaluation').textContent=ev.total?`${ev.completed}/${ev.total} ukończonych, ${ev.passed===undefined?'ocenianie oficjalnym graderem':ev.passed+' zaliczonych'} (${ev.state})`:'Brak bieżącego licznika ewaluacji';$('progress').max=ev.total||1;$('progress').value=ev.completed||0;$('case').textContent=ev.current_case?('Obecny przypadek: '+ev.current_case):'';
95-
const ledger=r.paper||{};$('paper').textContent=Object.entries(ledger.branches||{}).map(([name,b])=>`${name} | Equity ${fmt(b.equity)} ${ledger.currency||''} | Net P&L ${fmt(b.net_pnl_before_personal_tax)} | Costs ${fmt(b.modeled_costs)} | Resolved fills ${fmt(b.resolved_fills)}`).join('\n\n')||'No recorded paper ledger';$('blockers').textContent=(r.paper_blockers||[]).join('\n')||'No reported paper blockers';$('workers').textContent=JSON.stringify({drones:r.drones,external_compute:r.external_compute,desktop:r.desktop,official_benchmark:r.official_benchmark},null,2);$('log').textContent=data.controller_log||'Brak logu';$('evidence').textContent=JSON.stringify({last_cycle:learn.last_cycle,evidence:r.mission_evidence,collection_errors:data.errors},null,2);
95+
const ledger=r.paper||{};$('paper').textContent=Object.entries(ledger.branches||{}).map(([name,b])=>`${name} | Equity ${fmt(b.equity)} ${ledger.currency||''} | Net P&L ${fmt(b.net_pnl_before_personal_tax)} | Costs ${fmt(b.modeled_costs)} | Resolved fills ${fmt(b.resolved_fills)}`).join('\n\n')||'Paper ledger status unavailable';$('blockers').textContent=(r.paper_blockers||[]).join('\n')||(Array.isArray(r.paper_blockers)?'No blockers in recorded snapshot':'Paper blockers unavailable');$('workers').textContent=JSON.stringify({drones:r.drones,external_compute:r.external_compute,desktop:r.desktop,official_benchmark:r.official_benchmark},null,2);$('log').textContent=data.controller_log||'Brak logu';$('evidence').textContent=JSON.stringify({report_freshness:data.report_freshness,last_cycle:learn.last_cycle,evidence:r.mission_evidence,collection_errors:data.errors},null,2);
9696
$('backtests').replaceChildren();$('chart').replaceChildren();const tests=r.recent_exploratory_backtests||[];let largest=Math.max(.01,...tests.map(t=>Math.abs(t.development_test?.net_return||0)));$('chart').append(svg('line',{x1:400,y1:0,x2:400,y2:220,stroke:'#8296b1'}));tests.forEach((test,i)=>{const result=test.development_test||{},tr=document.createElement('tr');[`${i+1}. ${test.parameters?.rule||''}`,pct(result.net_return),pct(result.max_sampled_drawdown),fmt(result.fills)].forEach(v=>{let td=document.createElement('td');td.textContent=v;tr.append(td)});$('backtests').append(tr);if(typeof result.net_return==='number'&&Number.isFinite(result.net_return)){let width=Math.abs(result.net_return)/largest*280,y=15+i*48;$('chart').append(svg('rect',{x:result.net_return<0?400-width:400,y,width,height:26,fill:result.net_return<0?'#e68d80':'#75c5ae'}),svg('text',{x:8,y:y+19,fill:'#dce6f5','font-size':14},`${i+1}. ${pct(result.net_return)}`))}});if(!tests.length)$('chart').append(svg('text',{x:20,y:50,fill:'#adbdd1'},'Brak zapisanych wyników'));
9797
$('reports').replaceChildren();for(const id of data.paper_reports||[]){const row=document.createElement('p');row.append(document.createTextNode(id+' '));for(const [name,label] of [['report.html','HTML i wykresy'],['report.json','JSON'],['trades.csv','CSV']]){const a=document.createElement('a');a.href='/paper/'+encodeURIComponent(id)+'/'+name;a.target='_blank';a.rel='noopener';a.textContent=label;row.append(a,document.createTextNode(' · '))}$('reports').append(row)}
9898
}

‎rlm/v100/dashboard_snapshot.py‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"""Fast independent file snapshots when an aggregate report is unavailable.
2+
3+
Never reuse previous-run training counters or invent empty financial ledgers.
4+
"""
5+
6+
import json
7+
from pathlib import Path
8+
9+
10+
def supplement(root: Path, mission: dict, report: dict, errors: list) -> dict:
11+
from rlm.v100.goals import load_goal
12+
from rlm.v100.planning import read
13+
14+
result = dict(report)
15+
for key, filename in (
16+
("drones", "research/drones-status.json"),
17+
("external_compute", "research/compute-status.json"),
18+
("desktop", "research/desktop/status.json"),
19+
):
20+
path = root / filename
21+
if path.exists():
22+
try:
23+
if path.stat().st_size > 2 * 2**20:
24+
raise ValueError("Snapshot exceeds 2 MiB")
25+
value = json.loads(path.read_text())
26+
if not isinstance(value, dict):
27+
raise ValueError("Snapshot must be an object")
28+
result[key] = value
29+
except (OSError, ValueError) as error:
30+
errors.append(f"{key} snapshot unavailable: {str(error)[:200]}")
31+
try:
32+
goal = load_goal(root)
33+
if goal:
34+
result["plans"] = read(root)
35+
evidence = dict(result.get("mission_evidence", {}))
36+
evidence.setdefault("run", mission.get("run"))
37+
learning = dict(evidence.get("goal_learning", {}))
38+
if learning.get("goal_id") != goal["id"]:
39+
learning = {
40+
"goal_id": goal["id"],
41+
"scope": "Goal read from its verified file; forecast and training metrics unavailable",
42+
}
43+
for name, filename in (
44+
("cached", "research/goal-learning/status.json"),
45+
("observer", "research/goal-observer/status.json"),
46+
("owned_cpu_dispatch", "research/goal-compute/status.json"),
47+
):
48+
path = root / filename
49+
if path.exists() and path.stat().st_size <= 2 * 2**20:
50+
snapshot = json.loads(path.read_text())
51+
if name == "cached" and snapshot.get("goal_id") == goal["id"]:
52+
learning.update(snapshot)
53+
elif name != "cached" and snapshot.get("goal_id", goal["id"]) == goal["id"]:
54+
learning[name] = snapshot
55+
evidence["goal_learning"] = learning
56+
result["mission_evidence"] = evidence
57+
except (OSError, ValueError) as error:
58+
errors.append("Goal snapshot unavailable: " + str(error)[:200])
59+
return result

‎rlm/v100/drones.py‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ def schedule(root: Path, branch: str, kind: str, payload: str, interval: int) ->
5353
maximum = 12000 if kind in ("python", "desktop") else 1500 if kind == "source" else 400
5454
if not isinstance(payload, str) or not 1 <= len(payload) <= maximum:
5555
raise ValueError("Drone payload exceeds its budget")
56+
if (
57+
kind in ("desktop", "python")
58+
and "placeholder" in payload.lower()
59+
and re.search(r"(?m)^\s*pass\s*(?:#.*)?$", payload)
60+
):
61+
raise ValueError(
62+
"Placeholder script refused: implement the experiment or report its missing inputs; printing a simulation banner is not execution"
63+
)
5664
if type(interval) is not int or interval != 0 and not 300 <= interval <= 86400:
5765
raise ValueError("Drone interval: 0 once, or 300-86400 seconds")
5866
if kind == "source":
@@ -125,7 +133,10 @@ def execute(root: Path, job: dict) -> dict:
125133
if job["kind"] == "desktop":
126134
from rlm.v100.desktop import run
127135

128-
return run(root, job["payload"])
136+
return {
137+
**run(root, job["payload"]),
138+
"completion_scope": "Guest process execution only; task correctness and income effects are not independently verified",
139+
}
129140
if job["kind"] == "python":
130141
from rlm.v100.research_sandbox import run
131142

@@ -194,6 +205,25 @@ def finish(root: Path, identity: str, value: dict) -> None:
194205
state = (
195206
"cancelled" if row["state"] == "cancelled" else "queued" if interval else "completed"
196207
)
208+
if (
209+
row["kind"] != "compute-audit"
210+
and value.get("status") == "failed"
211+
and not interval
212+
and state != "cancelled"
213+
):
214+
state = "failed"
215+
if (
216+
row["kind"] in ("desktop", "python")
217+
and type(value.get("exit_code")) is int
218+
and value["exit_code"] != 0
219+
):
220+
value = {
221+
**value,
222+
"status": "execution failed",
223+
"completion_scope": "Process failed; no task success receipt",
224+
}
225+
if not interval and state != "cancelled":
226+
state = "failed"
197227
if (
198228
row["kind"] == "compute-audit"
199229
and value.get("status") == "failed"

0 commit comments

Comments
 (0)