Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ members = [
]

[workspace.package]
version = "0.3.68"
version = "0.3.69"
edition = "2024"
license = "MIT"
repository = "https://github.com/profullstack/c0mpute"
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@c0mpute/desktop",
"productName": "c0mpute",
"desktopName": "c0mpute-desktop.desktop",
"version": "0.3.68",
"version": "0.3.69",
"private": true,
"type": "module",
"description": "c0mpute desktop: chat, agent with your MCP servers and skills, node manager, hosting and tasks, with the c0mpute CLI bundled.",
Expand Down
2 changes: 1 addition & 1 deletion apps/tui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0mpute/tui",
"version": "0.3.68",
"version": "0.3.69",
"private": true,
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0mpute",
"version": "0.3.68",
"version": "0.3.69",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/releases/latest.json/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const dynamic = "force-dynamic";
* this in sync with the workspace version in `Cargo.toml` on each release so a
* freshly built CLI reports "already latest" rather than a phantom upgrade.
*/
const FALLBACK_VERSION = "0.3.68";
const FALLBACK_VERSION = "0.3.69";
const FALLBACK_MIN_REQUIRED = "0.0.1";

type Channel = "stable" | "beta" | "nightly";
Expand Down
2 changes: 1 addition & 1 deletion dips/0030-workflow-step-and-jobs-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ C0MPUTE_JOBS_TOKEN=<24-256 chars> c0mpute jobs serve [--listen 127.0.0.1:8788] [
- 504 `{ "error": "timeout" }`: no receipt, or the result could not be
fetched, before `timeout_ms`
- `max_price` defaults to the bridge's `--max-price` and can only lower it.
`timeout_ms` defaults to 60 000 and is clamped to 1 000..300 000; it covers
`timeout_ms` defaults to 60 000 and is clamped to 1 000..900 000; it covers
the bid window, the run and the result fetch.
- The bridge does not retry. An `http_call` may not be idempotent; retrying
is the requester's decision.
Expand Down
30 changes: 24 additions & 6 deletions node/crates/c0mpute-core/src/jobs_gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ use crate::{Config, JobAuction, Supervisor, run_auction, workflow};
pub const DEFAULT_BIND: &str = "127.0.0.1:8788";
pub const DEFAULT_TIMEOUT_MS: u64 = 60_000;
pub const MIN_TIMEOUT_MS: u64 = 1_000;
pub const MAX_TIMEOUT_MS: u64 = 300_000;
/// 15 min. Every live inference worker is a CPU node: an agent-sized chat turn
/// (1k+ tokens on a 7B-9B model) takes 3-5 min, and at 300 s the bridge threw
/// away answers that landed seconds later. The requester picks its own budget
/// under this ceiling.
pub const MAX_TIMEOUT_MS: u64 = 900_000;
pub const DEFAULT_BID_WINDOW: Duration = Duration::from_secs(2);
/// Jobs in flight through one bridge; more wait for a slot (inside their
/// own timeout).
Expand Down Expand Up @@ -398,11 +402,7 @@ async fn submit_inner(
Some(_) => return Err(bad_request("max_price must be a non-negative number")),
};
let allowed = effective_allow_peers(&state.allow_peers, req.allow_peers.as_deref())?;
let timeout_ms = req
.timeout_ms
.unwrap_or(DEFAULT_TIMEOUT_MS)
.clamp(MIN_TIMEOUT_MS, MAX_TIMEOUT_MS);
let timeout = Duration::from_millis(timeout_ms);
let timeout = request_timeout(req.timeout_ms);

match tokio::time::timeout(
timeout,
Expand All @@ -420,6 +420,15 @@ async fn submit_inner(
}
}

/// The request's `timeout_ms`, defaulted and clamped to the bridge's range.
fn request_timeout(timeout_ms: Option<u64>) -> Duration {
Duration::from_millis(
timeout_ms
.unwrap_or(DEFAULT_TIMEOUT_MS)
.clamp(MIN_TIMEOUT_MS, MAX_TIMEOUT_MS),
)
}

/// The request's `allow_peers` narrows the bridge's global list; it may not
/// widen it.
fn effective_allow_peers(
Expand Down Expand Up @@ -830,6 +839,15 @@ async fn attach_render_frames(
mod tests {
use super::*;

#[test]
fn request_timeout_allows_a_cpu_agent_turn() {
assert_eq!(request_timeout(None), Duration::from_secs(60));
// Infernet asks 420 s for chat on CPU workers; it must not be cut to 300 s.
assert_eq!(request_timeout(Some(420_000)), Duration::from_secs(420));
assert_eq!(request_timeout(Some(10_000_000)), Duration::from_secs(15 * 60));
assert_eq!(request_timeout(Some(5)), Duration::from_secs(1));
}

#[test]
fn workloads() {
assert_eq!(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0mpute-monorepo",
"version": "0.3.68",
"version": "0.3.69",
"private": true,
"workspaces": [
"apps/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/captcha/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/c0mpute-captcha",
"version": "0.3.68",
"version": "0.3.69",
"description": "Solve image, slider, gap, click-text, audio and math captchas on the c0mpute network: library (fetch().then(solveCaptcha)), CLI and stdio MCP server.",
"type": "module",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0mpute/shared",
"version": "0.3.68",
"version": "0.3.69",
"private": true,
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ad-generator-agent/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[module]
id = "ad-generator-agent"
name = "Ad Generator Agent — every ad type from one URL"
version = "0.3.68"
version = "0.3.69"
kind = "service"
category = "applications"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/ads-manager/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
[module]
id = "ads-manager"
name = "Ads Manager — shared ad operations layer"
version = "0.3.68"
version = "0.3.69"
kind = "service"
category = "applications"
status = "partial"
Expand Down
2 changes: 1 addition & 1 deletion plugins/apps/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[module]
id = "apps"
name = "Apps — backends with 3x redundancy"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "infrastructure"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/captcha/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[module]
id = "captcha"
name = "Captcha — image, slider, audio and math solving"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "ai"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/coinpay/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[module]
id = "coinpay"
name = "CoinPay — DID, payments, escrow, reputation"
version = "0.3.68"
version = "0.3.69"
kind = "service"
category = "applications"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/containers/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[module]
id = "containers"
name = "Containers — remote docker builds and jobs"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "developer"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/crawl/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[module]
id = "crawl"
name = "Crawl — distributed web fetching"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "data"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/crowdgpt/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
[module]
id = "crowdgpt"
name = "CrowdGPT: donate idle compute"
version = "0.3.68"
version = "0.3.69"
kind = "donation"
category = "ai"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/ctv-ads/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
[module]
id = "ctv-ads"
name = "CTV Ads — VAST and VMAP from every gateway"
version = "0.3.68"
version = "0.3.69"
kind = "service"
category = "applications"
status = "partial"
Expand Down
2 changes: 1 addition & 1 deletion plugins/diffusion/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[module]
id = "diffusion"
name = "Diffusion — image generation"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "ai"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/embed/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[module]
id = "embed"
name = "Embeddings — vector generation"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "ai"
status = "available"
Expand Down
2 changes: 1 addition & 1 deletion plugins/gameserver/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
[module]
id = "gameserver"
name = "Game server — Minecraft / Factorio / Valheim"
version = "0.3.68"
version = "0.3.69"
kind = "workload"
category = "infrastructure"
status = "available"
Expand Down
Loading
Loading