Skip to content

Commit c921660

Browse files
committed
v60: launch native GPU serving directly and track concrete income research receipts
1 parent c507dac commit c921660

25 files changed

Lines changed: 737 additions & 33 deletions

‎SYNTA_RECOVERY.md‎

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Synta recovery, v59
1+
# Synta recovery, v60
22

33
This fixes the uploaded dashboard snapshot's demonstrated failures, not a claim
44
that every strategy is profitable or every candidate must be accepted.
@@ -32,3 +32,42 @@ that every strategy is profitable or every candidate must be accepted.
3232
No change executes real orders, purchases, paid APIs or account creation. It does
3333
not certify the historical placeholder scalping/arbitrage scripts. Production
3434
execution and measured progress must be checked after installation on Debian.
35+
36+
## v60: native startup and concrete income research
37+
38+
- Managed native serving executes llama-server directly, with the original argv
39+
and library environment. CUDA loading overlaps artifact hashing; the protected
40+
receipt is bound to the actual child PID/start identity and unchanged files.
41+
Protected evaluation still waits for hashes and health. Native health startup
42+
is bounded to at most 180 seconds; failed children are retired. Hash I/O itself
43+
is visible but not interruptible by that deadline. No second inference CLI is
44+
launched. This removes a redundant startup path; the user's precise stalled
45+
stack was not supplied, so a successful V100 start remains a hardware check.
46+
- `mission-status.server_startup` and dashboard show startup stage/PID/error.
47+
Isolated/remote transports are labelled separately, not claimed as native GPU.
48+
- Operator helper duty percent is preserved by research policy. The old policy
49+
silently capped 50% at 30%; no hard utilization or board power cap is claimed.
50+
- UI-dominated and known previous commissioning income plans are archived and
51+
replaced with evidence-backed opportunities/tests across domains. Automatic
52+
financial plans cannot smuggle UI work in by mentioning income/forecasts.
53+
The long-term goal and explicit operator authority stay unchanged.
54+
- One bounded, deduplicated RTX research assignment runs every ten minutes
55+
independently of the V100 training phase when income research is enabled.
56+
Queue failures are recorded. Allocation alone is not discovery or success.
57+
- `income_opportunities` and `register_income_opportunity` expose fresh
58+
host-archived source IDs, conservative gross/net estimates before personal
59+
tax, labor, first-income delay, eligibility, blockers and falsification.
60+
Zero upfront spend is mandatory. Estimates cannot become actual revenue,
61+
training labels or accepted master weights. Earlier versions are retained;
62+
repeated titles/domain update a candidate instead of multiplying it.
63+
- Actual public fetch counters distinguish distinct URLs/content and unchanged
64+
rereads. Event/source IDs, checksums and acquisition times are separate from
65+
the shared journal filename. Historical finished jobs are labelled. Old local
66+
stream fragments are cleared when a new inference starts. Counters cover only
67+
instrumented calls, not unseen OS/network activity.
68+
- Dashboard adds opportunity/test and source-acquisition panels through the
69+
existing transactional renderer; no guest script permission is expanded.
70+
71+
No payment ledger is connected. Nothing here guarantees an undiscovered edge,
72+
fast large income, validated strategy, automatic sale or universal continual
73+
learning. Prepared useful work, actual outcomes and payment remain distinct.

‎SYNTA_REQUIREMENTS_AUDIT.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Synta: requirement and verification audit, v59
1+
# Synta: requirement and verification audit, v60
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.
@@ -70,3 +70,17 @@ See `SYNTA_RECOVERY.md`: same-run stale-report preservation, independent verifie
7070
goal reads, read-only goal-status SQLite, actual process/forecast receipts, archived
7171
UI-plan recovery and independent forward-only financial reference labels. These
7272
labels commission supervised task data, not model skill or profitable strategies.
73+
74+
## v60 recovery additions
75+
76+
Native startup now bypasses a second controller CLI and reports stages with a
77+
child-bound protected receipt. Research respects the operator's 50% pacing.
78+
Income candidates/tests have their own bounded, versioned evidence ledger and
79+
periodic RTX allocation, including non-market mechanisms. UI work cannot replace
80+
automatic financial plans. Public-source counters distinguish rereads and fresh
81+
content; event evidence is separate from a shared journal path.
82+
83+
Validation includes a real child HTTP server standing in for the native binary,
84+
actual SQLite/host source archives with mocked network, concurrent fetch-counter
85+
updates, invalid/stale evidence rejection and explicit unknown payment. It does
86+
not test V100 CUDA, profitability, actual demand or the operator's Windows run.

‎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.59"
6+
version = "0.1.3+v100.60"
77
description = "Recursive Language Models."
88
readme = "README.md"
99
license = "MIT"

‎rlm/v100/background_observer.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
def tick(root: Path) -> None:
1313
from rlm.v100.goal_compute import tick as compute_tick
1414
from rlm.v100.goal_learning import tick as goal_tick
15+
from rlm.v100.income_opportunities import commission
1516
from rlm.v100.spot_bootstrap import prepare
1617

18+
commission(root)
19+
1720
try:
1821
goal_tick(root)
1922
except (OSError, ValueError, RuntimeError, requests.RequestException) as error:

‎rlm/v100/competition.py‎

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,22 @@ def guard_cpu_process(
7777
def managed_server(
7878
profile_path: Path, root: Path, log_path: Path, cancel: threading.Event | None = None
7979
):
80+
log_path.parent.mkdir(parents=True, exist_ok=True)
81+
startup_path = log_path.with_suffix(".startup.json")
82+
83+
def startup(stage: str, **details) -> None:
84+
value = {"stage": stage, "updated": time.time(), "log": str(log_path), **details}
85+
atomic_json(startup_path, value)
86+
print("Server startup:", json.dumps(value), flush=True)
87+
88+
startup("validating-profile")
8089
profile = load_profile(profile_path, root)
8190
from rlm.v100.remote_helper import remote_profile
82-
from rlm.v100.scratch_master import is_scratch, verify
8391

84-
if is_scratch(profile):
92+
if profile["runtime"].get("backend") == "isolated-architecture":
93+
from rlm.v100.scratch_master import verify
94+
95+
startup("verifying-isolated-architecture")
8596
verify(profile)
8697
log_path.parent.mkdir(parents=True, exist_ok=True)
8798
with log_path.open("a") as log:
@@ -95,6 +106,7 @@ def managed_server(
95106
return
96107

97108
if remote_profile(profile):
109+
startup("checking-remote-backend", endpoint=profile["runtime"]["base_url"])
98110
client = helper_client(profile, root)
99111
from rlm.v100.remote_helper import OllamaResearchClient
100112

@@ -125,16 +137,31 @@ def managed_server(
125137
}
126138
if cpu:
127139
environment["CUDA_VISIBLE_DEVICES"] = ""
128-
log_path.parent.mkdir(parents=True, exist_ok=True)
140+
if profile["server"].get("library_path"):
141+
environment["LD_LIBRARY_PATH"] = (
142+
profile["server"]["library_path"] + ":" + environment.get("LD_LIBRARY_PATH", "")
143+
)
144+
from rlm.v100.cli import server_command
145+
from rlm.v100.serving import write_receipt
146+
147+
argv = server_command(profile)
148+
for key in ("binary", "model", "draft_model"):
149+
value = profile["server"][key]
150+
if value and not Path(value).is_file():
151+
raise FileNotFoundError(value)
152+
startup("launching-native-process")
129153
with log_path.open("a") as log:
154+
log.write("Starting native server directly: " + json.dumps(argv) + "\n")
155+
log.flush()
130156
process = subprocess.Popen(
131-
command(root, profile_path, "serve"),
157+
argv,
132158
stdout=log,
133159
stderr=subprocess.STDOUT,
134160
env=environment,
135161
)
136162
stop_guard = threading.Event()
137163
guard = None
164+
ready = False
138165
if cpu and profile.get("resources", {}).get("cpu_guard"):
139166
guard = threading.Thread(
140167
target=guard_cpu_process,
@@ -143,9 +170,21 @@ def managed_server(
143170
)
144171
guard.start()
145172
try:
173+
deadline = time.monotonic() + min(180, profile["runtime"]["max_timeout"])
174+
startup("verifying-artifacts", pid=process.pid)
175+
# The native child loads CUDA concurrently with verification. No second
176+
# controller CLI import, registry initialization or Python launcher.
177+
if process.poll() is not None:
178+
raise RuntimeError(f"Native server exited before verification; inspect {log_path}")
179+
try:
180+
write_receipt(profile, root, pid=process.pid)
181+
except ProcessLookupError as error:
182+
raise RuntimeError(
183+
f"Native server exited during verification; inspect {log_path}"
184+
) from error
185+
startup("waiting-for-health", pid=process.pid)
146186
if cpu:
147187
os.setpriority(os.PRIO_PROCESS, process.pid, 10)
148-
deadline = time.monotonic() + profile["runtime"]["max_timeout"]
149188
with requests.Session() as session:
150189
session.trust_env = False
151190
while True:
@@ -165,7 +204,12 @@ def managed_server(
165204
if response.status_code == 200:
166205
break
167206
time.sleep(0.25)
207+
startup("ready", pid=process.pid)
208+
ready = True
168209
yield profile
210+
except Exception as error:
211+
startup("failed", pid=process.pid, error=str(error)[:500])
212+
raise
169213
finally:
170214
stop_guard.set()
171215
if guard is not None:
@@ -177,6 +221,8 @@ def managed_server(
177221
except subprocess.TimeoutExpired:
178222
process.kill()
179223
process.wait()
224+
if ready:
225+
startup("stopped", pid=process.pid)
180226

181227

182228
@contextmanager

0 commit comments

Comments
 (0)