fix: harden Ito integration CI and framing

This commit is contained in:
Affaan Mustafa
2026-07-22 02:54:26 -04:00
parent 4e3411835c
commit 8eb4338306
13 changed files with 151 additions and 64 deletions
+1 -1
View File
@@ -16,4 +16,4 @@ export ANTHROPIC_AUTH_TOKEN=your-token
claude claude
``` ```
If that endpoint is backed by a self-hosted open model, Itô is ECC's preferred compute sponsor: [sign in, rent, or manage GPUs](https://compute.itomarkets.com). Any GPU provider works. Managed inference through Itô is not live yet; the route is for compute rental and dashboard access only. ECC does not change Claude Code transport settings or provision serving. Run or self-host any open-source model behind that endpoint. Itô is ECC's preferred compute sponsor: [open the Itô dashboard to sign in and rent or manage GPUs](https://compute.itomarkets.com). Any GPU provider works. ECC only provides this link; it does not change Claude Code transport settings or provision compute or serving. Managed inference through Itô is not live yet.
+1 -1
View File
@@ -23,4 +23,4 @@ bash ./install.sh --target kimi --profile minimal
## Self-hosted model compute ## Self-hosted model compute
If you plan to run Kimi or another open model on rented GPUs, Itô is ECC's preferred compute sponsor: [sign in, rent, or manage GPUs](https://compute.itomarkets.com). Any GPU provider works. Managed inference through Itô is not live yet; the route is for compute rental and dashboard access only. ECC does not provision or serve the model in Phase 1. Run or self-host any open-source model—including Kimi—on owned or rented GPUs. Itô is ECC's preferred compute sponsor: [open the Itô dashboard to sign in and rent or manage GPUs](https://compute.itomarkets.com). Any GPU provider works. ECC only provides this link; it does not provision compute or serving. Managed inference through Itô is not live yet.
+2 -2
View File
@@ -115,7 +115,7 @@ ECC v2.0.0 adds the public Hermes operator story on top of that reusable layer:
</tr> </tr>
</table> </table>
<sub><strong>Self-hosting an open model?</strong> Itô is ECC's preferred compute sponsor: <a href="https://compute.itomarkets.com">sign in, rent, or manage GPUs</a>. Any GPU provider works. Managed inference through Itô is not live yet; the link is for compute rental and dashboard access only.</sub> <sub><strong>Run or self-host any open-source model.</strong> Itô is ECC's preferred compute sponsor: <a href="https://compute.itomarkets.com">open the Itô dashboard to sign in and rent or manage GPUs</a>. Any GPU provider works. ECC only provides this link; it does not provision compute or serving. Managed inference through Itô is not live yet.</sub>
<sub><strong>Community sponsors:</strong> <a href="https://github.com/mikejmorgan-ai">Mike Morgan</a> · <a href="https://github.com/jasonwu513">@jasonwu513</a> · <a href="https://github.com/1anter">@1anter</a> · <a href="https://github.com/massimotodaro">@massimotodaro</a> · <a href="https://github.com/meadmccabe">@meadmccabe</a></sub> <sub><strong>Community sponsors:</strong> <a href="https://github.com/mikejmorgan-ai">Mike Morgan</a> · <a href="https://github.com/jasonwu513">@jasonwu513</a> · <a href="https://github.com/1anter">@1anter</a> · <a href="https://github.com/massimotodaro">@massimotodaro</a> · <a href="https://github.com/meadmccabe">@meadmccabe</a></sub>
@@ -1196,7 +1196,7 @@ claude
If your gateway remaps model names, configure that in Claude Code rather than in ECC. ECC's hooks, skills, commands, and rules are model-provider agnostic once the `claude` CLI is already working. If your gateway remaps model names, configure that in Claude Code rather than in ECC. ECC's hooks, skills, commands, and rules are model-provider agnostic once the `claude` CLI is already working.
Self-hosting the model behind that gateway requires separate compute and serving setup. If you need GPU capacity, [Itô](https://compute.itomarkets.com) is ECC's preferred compute sponsor; any GPU provider works. The link routes to GPU rental and dashboard access only—managed inference through Itô is not live yet. Run or self-host any open-source model behind that gateway using separate compute and serving setup. If you need GPU capacity, [Itô](https://compute.itomarkets.com) is ECC's preferred compute sponsor; any GPU provider works. ECC only links to the Itô dashboard for sign-in and GPU rental or management—it does not provision compute or serving. Managed inference through Itô is not live yet.
Official references: Official references:
- [Claude Code LLM gateway docs](https://docs.anthropic.com/en/docs/claude-code/llm-gateway) - [Claude Code LLM gateway docs](https://docs.anthropic.com/en/docs/claude-code/llm-gateway)
+1 -1
View File
@@ -17,7 +17,7 @@ Thank you to everyone funding ECC's open-source work. Your sponsorship is what l
*[Become a Business sponsor](https://github.com/sponsors/affaan-m) to get README sponsor placement + SPONSORS.md listing. Current Business tier is $500/mo. No seats, SLA, custom development, or preferential technical placement is bundled unless separately agreed.* *[Become a Business sponsor](https://github.com/sponsors/affaan-m) to get README sponsor placement + SPONSORS.md listing. Current Business tier is $500/mo. No seats, SLA, custom development, or preferential technical placement is bundled unless separately agreed.*
Itô is ECC's preferred compute sponsor for users who want to self-host open models. ECC remains provider-agnostic: any GPU provider works, and managed inference through Itô is not live yet. The [Itô compute route](https://compute.itomarkets.com) is for sign-in, GPU rental, and dashboard access. Run or self-host any open-source model. Itô is ECC's preferred compute sponsor, while ECC remains provider-agnostic and any GPU provider works. ECC only links to the [Itô dashboard](https://compute.itomarkets.com) for sign-in and GPU rental or management; it does not provision compute or serving. Managed inference through Itô is not live yet.
## Team Sponsors — $200/mo ## Team Sponsors — $200/mo
+1 -1
View File
@@ -2,7 +2,7 @@
[Atlas Cloud](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=everything-claude-code) is a full-modal AI inference platform providing an OpenAI-compatible API for 59+ LLM models, image generation, and video generation. [Atlas Cloud](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=everything-claude-code) is a full-modal AI inference platform providing an OpenAI-compatible API for 59+ LLM models, image generation, and video generation.
> Self-hosting an open model instead of using a managed API? Itô is ECC's preferred compute sponsor: [sign in, rent, or manage GPUs](https://compute.itomarkets.com). Any GPU provider works. Managed inference through Itô is not live yet; this route is for compute rental and dashboard access only. > Run or self-host any open-source model instead of using a managed API. Itô is ECC's preferred compute sponsor: [open the Itô dashboard to sign in and rent or manage GPUs](https://compute.itomarkets.com). Any GPU provider works. ECC only provides this link; it does not provision compute or serving. Managed inference through Itô is not live yet.
## Configuration ## Configuration
+9 -7
View File
@@ -23,7 +23,7 @@ built until Affaan approves the decisions at the end of this document.
The distribution chain is: The distribution chain is:
GPU compute (Itô) GPU compute (Itô)
-> open model (Kimi, GLM, or another model) -> any open-source model
-> model harness -> model harness
-> ECC meta-harness -> ECC meta-harness
@@ -60,15 +60,17 @@ Phase 1 is the smallest shippable slice and is prepared before Phase 2:
| ecc-universal npm surface | README placement, packaged sponsor assets, and install welcome copy | | ecc-universal npm surface | README placement, packaged sponsor assets, and install welcome copy |
| ECC installer | Human help and install-plan footer route self-host intent to Itô; JSON remains machine-pure | | ECC installer | Human help and install-plan footer route self-host intent to Itô; JSON remains machine-pure |
| ECC CLI | Top-level help shows the same shared compute disclosure | | ECC CLI | Top-level help shows the same shared compute disclosure |
| Claude plugin and Kimi harness docs | Bring-your-own endpoint/model notes route GPU needs to Itô without claiming provisioning | | Harness-specific endpoint/model docs | Bring-your-own endpoint/model notes route GPU needs to Itô without claiming provisioning |
| Local-model selector | Ollama selection shows a passive compute-rental/dashboard notice; no Itô provider adapter | | Local-model selector | Ollama selection shows a passive compute-rental/dashboard notice; no Itô provider adapter |
| ecc.tools | Sponsor card, sponsor proof chip, and explicit no-serving boundary | | ecc.tools | Sponsor card, sponsor proof chip, and explicit no-serving boundary |
| AgentShield / ecc-agentshield | Sponsor callout in the GitHub and npm README; no ads in security reports | | AgentShield / ecc-agentshield | Sponsor callout in the GitHub and npm README; no ads in security reports |
Launch coordination still matters: Launch coordination still matters:
- The public PRs and package releases should be coordinated with the public Kimi - Merge the public PRs when their required checks and reviews pass. Coordinate
video and sponsorship announcement. npm publication and the verified ecc.tools deployment as explicit release
steps; do not tie the generic OSS-compute integration to an unpublished model
or model-provider announcement.
- npm READMEs update only when new versions are published. Merging source changes - npm READMEs update only when new versions are published. Merging source changes
alone does not update the already-published ecc-universal or ecc-agentshield alone does not update the already-published ecc-universal or ecc-agentshield
package pages. package pages.
@@ -127,7 +129,7 @@ Non-goals:
- Do not claim ECC or Itô created an endpoint. - Do not claim ECC or Itô created an endpoint.
- Do not fabricate Itô inventory, pricing, credentials, or rental identifiers. - Do not fabricate Itô inventory, pricing, credentials, or rental identifiers.
- Do not force Kimi; the skill is model-agnostic. - Do not force any model family; the skill is model-agnostic.
## Channel B: training and GPU operations ## Channel B: training and GPU operations
@@ -548,8 +550,8 @@ Each slice must use its own focused PR and stay mergeable without later slices.
- [ ] Confirm that this approval covers delivery slices 1 and 2 only; live auth, - [ ] Confirm that this approval covers delivery slices 1 and 2 only; live auth,
billing, create, list/get, and stop remain separately approval-gated. billing, create, list/get, and stop remain separately approval-gated.
- [ ] Supply or explicitly defer the OAuth and rental API contract. - [ ] Supply or explicitly defer the OAuth and rental API contract.
- [ ] Confirm current Kimi-harness endpoint configuration before publishing an - [ ] Confirm endpoint configuration for every supported harness before
example. publishing an example.
- [ ] Decide whether prediction-market ito-* skills remain supported or enter a - [ ] Decide whether prediction-market ito-* skills remain supported or enter a
later, separate deprecation cycle. later, separate deprecation cycle.
- [ ] Validate WorkloadSplitPlan with the LinkedIn contact before describing - [ ] Validate WorkloadSplitPlan with the LinkedIn contact before describing
+14 -14
View File
@@ -1122,9 +1122,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/fast-uri": { "node_modules/fast-uri": {
"version": "3.1.2", "version": "3.1.4",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.4.tgz",
"integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", "integrity": "sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -1472,9 +1472,9 @@
} }
}, },
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "4.2.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -1590,9 +1590,9 @@
} }
}, },
"node_modules/linkify-it": { "node_modules/linkify-it": {
"version": "5.0.1", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.1.tgz", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz",
"integrity": "sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==", "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -1652,9 +1652,9 @@
} }
}, },
"node_modules/markdown-it": { "node_modules/markdown-it": {
"version": "14.2.0", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.2.0.tgz", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz",
"integrity": "sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==", "integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -1669,8 +1669,8 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"argparse": "^2.0.1", "argparse": "^2.0.1",
"entities": "^4.4.0", "entities": "^4.5.0",
"linkify-it": "^5.0.1", "linkify-it": "^5.0.2",
"mdurl": "^2.0.0", "mdurl": "^2.0.0",
"punycode.js": "^2.3.1", "punycode.js": "^2.3.1",
"uc.micro": "^2.1.0" "uc.micro": "^2.1.0"
+7 -5
View File
@@ -411,7 +411,7 @@
"ecc-plan-canvas": "scripts/plan-canvas.js" "ecc-plan-canvas": "scripts/plan-canvas.js"
}, },
"scripts": { "scripts": {
"welcome": "echo '\\n ecc-universal installed!\\n Run: ecc typescript\\n Compat: ecc-install typescript\\n Docs: https://github.com/affaan-m/ECC\\n Compute: Itô is the preferred compute sponsor — https://compute.itomarkets.com\\n Any GPU provider works; managed inference through Itô is not live yet.\\n'", "welcome": "echo '\\n ecc-universal installed!\\n Run: ecc typescript\\n Compat: ecc-install typescript\\n Docs: https://github.com/affaan-m/ECC\\n Run or self-host any open-source model.\\n Compute: Itô is the preferred compute sponsor — https://compute.itomarkets.com\\n Any GPU provider works; ECC only links to the dashboard and does not provision compute or serving.\\n Managed inference through Itô is not live yet.\\n'",
"catalog:check": "node scripts/ci/catalog.js --text", "catalog:check": "node scripts/ci/catalog.js --text",
"catalog:sync": "node scripts/ci/catalog.js --write --text", "catalog:sync": "node scripts/ci/catalog.js --write --text",
"command-registry:generate": "node scripts/ci/generate-command-registry.js", "command-registry:generate": "node scripts/ci/generate-command-registry.js",
@@ -460,12 +460,14 @@
"node": ">=18" "node": ">=18"
}, },
"overrides": { "overrides": {
"markdown-it": ">=14.2.0", "fast-uri": "3.1.4",
"js-yaml": ">=4.2.0" "markdown-it": "14.3.0",
"js-yaml": "4.3.0"
}, },
"resolutions": { "resolutions": {
"markdown-it": ">=14.2.0", "fast-uri": "3.1.4",
"js-yaml": ">=4.2.0" "markdown-it": "14.3.0",
"js-yaml": "4.3.0"
}, },
"packageManager": "yarn@4.9.2+sha512.1fc009bc09d13cfd0e19efa44cbfc2b9cf6ca61482725eb35bbc5e257e093ebf4130db6dfe15d604ff4b79efd8e1e8e99b25fa7d0a6197c9f9826358d4d65c3c" "packageManager": "yarn@4.9.2+sha512.1fc009bc09d13cfd0e19efa44cbfc2b9cf6ca61482725eb35bbc5e257e093ebf4130db6dfe15d604ff4b79efd8e1e8e99b25fa7d0a6197c9f9826358d4d65c3c"
} }
+4 -3
View File
@@ -3,10 +3,11 @@
const ITO_COMPUTE_URL = 'https://compute.itomarkets.com'; const ITO_COMPUTE_URL = 'https://compute.itomarkets.com';
function getComputeSponsorCopy() { function getComputeSponsorCopy() {
return "Itô is ECC's preferred compute sponsor: sign in, rent, or manage GPUs at " return "Run or self-host any open-source model. Itô is ECC's preferred compute sponsor: "
+ 'open its dashboard to sign in and rent or manage GPUs at '
+ ITO_COMPUTE_URL + ITO_COMPUTE_URL
+ '. Any GPU provider works. Managed inference through Itô is not live yet; ' + '. Any GPU provider works. ECC only provides this link; it does not provision '
+ 'this route is for compute rental and dashboard access only.'; + 'compute or serving. Managed inference through Itô is not live yet.';
} }
module.exports = Object.freeze({ module.exports = Object.freeze({
+4 -3
View File
@@ -36,12 +36,13 @@ def print_self_host_compute_notice(provider: str) -> None:
return return
print( print(
"\nItô is ECC's preferred compute sponsor: " "\nRun or self-host any open-source model. "
"Itô is ECC's preferred compute sponsor: "
"https://compute.itomarkets.com" "https://compute.itomarkets.com"
) )
print( print(
"Any GPU provider works. Managed inference through Itô is not live yet; " "Any GPU provider works. ECC only links to the Itô dashboard; it does not "
"the route is for sign-in, compute rental, and dashboard access only." "provision compute or serving. Managed inference through Itô is not live yet."
) )
+56 -6
View File
@@ -9,7 +9,17 @@ const path = require('path');
const { spawnSync } = require('child_process'); const { spawnSync } = require('child_process');
const REPO_ROOT = path.join(__dirname, '..', '..'); const REPO_ROOT = path.join(__dirname, '..', '..');
const COMPUTE_URL = 'https://compute.itomarkets.com'; const URL_TOKEN_PATTERN = /https?:\/\/[^\s<>"'`(){}\\]+/g;
const EXPECTED_COMPUTE_ROUTE = Object.freeze({
protocol: 'https:',
hostname: 'compute.itomarkets.com',
port: '',
username: '',
password: '',
pathname: '/',
search: '',
hash: '',
});
function read(relativePath) { function read(relativePath) {
return fs.readFileSync(path.join(REPO_ROOT, relativePath), 'utf8'); return fs.readFileSync(path.join(REPO_ROOT, relativePath), 'utf8');
@@ -27,9 +37,29 @@ function runTest(name, fn) {
} }
} }
function isExactComputeRoute(candidate) {
try {
const parsed = new URL(candidate.replace(/[.,;:!?]+$/, ''));
return Object.entries(EXPECTED_COMPUTE_ROUTE).every(
([property, expected]) => parsed[property] === expected
);
} catch {
return false;
}
}
function assertExactComputeRoute(content) {
const candidates = content.match(URL_TOKEN_PATTERN) || [];
assert.ok(
candidates.some(isExactComputeRoute),
'Should include the exact Itô compute route'
);
}
function assertHonestComputeCopy(content) { function assertHonestComputeCopy(content) {
assert.ok(content.includes(COMPUTE_URL), 'Should route compute intent to Ito'); assertExactComputeRoute(content);
assert.match(content, /preferred compute sponsor/i); assert.match(content, /preferred compute sponsor/i);
assert.match(content, /run or self-host any open-source model/i);
assert.match(content, /any GPU provider/i); assert.match(content, /any GPU provider/i);
assert.match(content, /managed inference[^\n.]*not live/i); assert.match(content, /managed inference[^\n.]*not live/i);
} }
@@ -41,13 +71,26 @@ function main() {
let failed = 0; let failed = 0;
const tests = [ const tests = [
['compute route validation rejects deceptive lookalike hosts', () => {
const deceptiveCopy = [
'Itô is the preferred compute sponsor:',
'https://compute.itomarkets.com.attacker.example',
'Any GPU provider works.',
'Managed inference through Itô is not live.',
].join(' ');
assert.throws(
() => assertHonestComputeCopy(deceptiveCopy),
/exact Itô compute route/
);
}],
['README exposes the sponsor logo and honest self-hosting route', () => { ['README exposes the sponsor logo and honest self-hosting route', () => {
const readme = read('README.md'); const readme = read('README.md');
assert.ok(readme.includes('assets/images/sponsors/ito.svg')); assert.ok(readme.includes('assets/images/sponsors/ito.svg'));
assertHonestComputeCopy(readme); assertHonestComputeCopy(readme);
assert.match( assert.match(
readme, readme,
/custom API endpoint or model gateway[\s\S]*Self-hosting the model behind that gateway[\s\S]*compute\.itomarkets\.com/ /custom API endpoint or model gateway[\s\S]*Run or self-host any open-source model behind that gateway[\s\S]*ECC only links to the Itô dashboard/
); );
const sponsorMark = read('assets/images/sponsors/ito.svg'); const sponsorMark = read('assets/images/sponsors/ito.svg');
assert.match(sponsorMark, /<path\b/); assert.match(sponsorMark, /<path\b/);
@@ -61,15 +104,21 @@ function main() {
const sponsors = read('SPONSORS.md'); const sponsors = read('SPONSORS.md');
assert.ok(sponsors.includes('[**Itô**]')); assert.ok(sponsors.includes('[**Itô**]'));
assert.ok(sponsors.includes('assets/images/sponsors/ito.svg')); assert.ok(sponsors.includes('assets/images/sponsors/ito.svg'));
assert.ok(sponsors.includes(COMPUTE_URL)); assertExactComputeRoute(sponsors);
}], }],
['inference guide distinguishes rental compute from managed serving', () => { ['inference guide distinguishes rental compute from managed serving', () => {
assertHonestComputeCopy(read('docs/ATLAS-CLOUD-GUIDE.md')); assertHonestComputeCopy(read('docs/ATLAS-CLOUD-GUIDE.md'));
}], }],
['Claude plugin and Kimi harness docs route self-host intent without lock-in', () => { ['harness docs route generic open-source model intent without lock-in', () => {
assertHonestComputeCopy(read('.claude-plugin/README.md')); assertHonestComputeCopy(read('.claude-plugin/README.md'));
assertHonestComputeCopy(read('.kimi/README.md')); assertHonestComputeCopy(read('.kimi/README.md'));
}], }],
['Phase 2 plan keeps its thesis and release framing generic', () => {
const plan = read('docs/design/ecc-ito-compute-integration.md');
assert.match(plan, /-> any open-source model/);
assert.doesNotMatch(plan, /public Kimi|Moonshot|video and sponsorship/i);
assert.match(plan, /Status: \*\*Proposed/);
}],
['top-level CLI help exposes the provider-neutral compute route', () => { ['top-level CLI help exposes the provider-neutral compute route', () => {
const result = spawnSync('node', ['scripts/ecc.js', '--help'], { const result = spawnSync('node', ['scripts/ecc.js', '--help'], {
cwd: REPO_ROOT, cwd: REPO_ROOT,
@@ -108,7 +157,8 @@ function main() {
['npm package publishes the Ito mark and welcome route', () => { ['npm package publishes the Ito mark and welcome route', () => {
const packageJson = JSON.parse(read('package.json')); const packageJson = JSON.parse(read('package.json'));
assert.ok(packageJson.files.includes('assets/images/sponsors/')); assert.ok(packageJson.files.includes('assets/images/sponsors/'));
assert.ok(packageJson.scripts.welcome.includes(COMPUTE_URL)); assertExactComputeRoute(packageJson.scripts.welcome);
assert.match(packageJson.scripts.welcome, /run or self-host any open-source model/i);
assert.ok(fs.existsSync(path.join(REPO_ROOT, 'assets', 'images', 'sponsors', 'ito.svg'))); assert.ok(fs.existsSync(path.join(REPO_ROOT, 'assets', 'images', 'sponsors', 'ito.svg')));
}], }],
]; ];
+32 -1
View File
@@ -1,7 +1,11 @@
"""Tests for provider-selection compute guidance.""" """Tests for provider-selection compute guidance."""
import importlib.util import importlib.util
import re
from pathlib import Path from pathlib import Path
from urllib.parse import urlsplit
import pytest
SELECTOR_PATH = Path(__file__).parents[1] / "src" / "llm" / "cli" / "selector.py" SELECTOR_PATH = Path(__file__).parents[1] / "src" / "llm" / "cli" / "selector.py"
@@ -11,12 +15,39 @@ SELECTOR = importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(SELECTOR) SPEC.loader.exec_module(SELECTOR)
print_self_host_compute_notice = SELECTOR.print_self_host_compute_notice print_self_host_compute_notice = SELECTOR.print_self_host_compute_notice
URL_TOKEN_PATTERN = re.compile(r"https?://[^\s<>\"'`()\[\]{}\\]+")
EXPECTED_COMPUTE_ROUTE = (
"https",
"compute.itomarkets.com",
"",
"",
"",
)
def assert_exact_compute_route(content: str) -> None:
candidates = URL_TOKEN_PATTERN.findall(content)
routes = (
urlsplit(candidate.rstrip(".,;:!?"))
for candidate in candidates
)
assert any(route == EXPECTED_COMPUTE_ROUTE for route in routes), (
"Should include the exact Itô compute route"
)
def test_compute_route_validation_rejects_deceptive_lookalike_host():
deceptive_output = "https://compute.itomarkets.com.attacker.example"
with pytest.raises(AssertionError, match="exact Itô compute route"):
assert_exact_compute_route(deceptive_output)
def test_ollama_notice_routes_to_ito_without_claiming_serving(capsys): def test_ollama_notice_routes_to_ito_without_claiming_serving(capsys):
print_self_host_compute_notice("ollama") print_self_host_compute_notice("ollama")
output = capsys.readouterr().out output = capsys.readouterr().out
assert "https://compute.itomarkets.com" in output assert_exact_compute_route(output)
assert "preferred compute sponsor" in output assert "preferred compute sponsor" in output
assert "Any GPU provider works" in output assert "Any GPU provider works" in output
assert "Managed inference through Itô is not live yet" in output assert "Managed inference through Itô is not live yet" in output
+19 -19
View File
@@ -622,7 +622,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"entities@npm:^4.4.0": "entities@npm:^4.5.0":
version: 4.5.0 version: 4.5.0
resolution: "entities@npm:4.5.0" resolution: "entities@npm:4.5.0"
checksum: 10c0/5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250 checksum: 10c0/5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250
@@ -801,10 +801,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"fast-uri@npm:^3.0.1": "fast-uri@npm:3.1.4":
version: 3.1.2 version: 3.1.4
resolution: "fast-uri@npm:3.1.2" resolution: "fast-uri@npm:3.1.4"
checksum: 10c0/5b35641895959f3f7ab7a7b1b5542bded159346f25ec9f256817b206d50b64eda5828e90d605a2e2fc645c90519a7259c2bab2c942ee728c88b88e5be21b090d checksum: 10c0/f90948821ceb49980f64f89b8216ba498f5957f26035be813526a55b6145d26cbd63ef5618d5205a3292b31edc9c08589749350cd72bd86c7095eb434dceb757
languageName: node languageName: node
linkType: hard linkType: hard
@@ -1066,14 +1066,14 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"js-yaml@npm:>=4.2.0": "js-yaml@npm:4.3.0":
version: 4.2.0 version: 4.3.0
resolution: "js-yaml@npm:4.2.0" resolution: "js-yaml@npm:4.3.0"
dependencies: dependencies:
argparse: "npm:^2.0.1" argparse: "npm:^2.0.1"
bin: bin:
js-yaml: bin/js-yaml.js js-yaml: bin/js-yaml.js
checksum: 10c0/1916456c118746603b067d74bbcbb0445d9a1d5e474ad4ae775e7b20525bed902e01d9d97dd0c81fcd8d4f596162309d0eb057f4aa38f3e9647f14075e9dea45 checksum: 10c0/058b30473d6915ca5b4feb11e2f7d4d97242f98d00a798ed48dd90b46b7c640398afe9128c5db22c5300f8c6528fe2a174b9a93f351a70ebc28c6203938d8bff
languageName: node languageName: node
linkType: hard linkType: hard
@@ -1156,12 +1156,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"linkify-it@npm:^5.0.1": "linkify-it@npm:^5.0.2":
version: 5.0.1 version: 5.0.2
resolution: "linkify-it@npm:5.0.1" resolution: "linkify-it@npm:5.0.2"
dependencies: dependencies:
uc.micro: "npm:^2.0.0" uc.micro: "npm:^2.0.0"
checksum: 10c0/d06d04f1ed03be131740fc900a5e74ea1f49886b052213599e306d469d5ffe2303db76dd8f771de9f28e2b0b38852de22ec46ae597d245f8b66439b0ceb19b10 checksum: 10c0/dd70b1735a13d41a2cff0a058ac3771166038f23f6aff004dd53873cf985c64b107902fe0b544a5b3d1ff6e63249cf9c648fb3ae9f285481db48f56887adb0d6
languageName: node languageName: node
linkType: hard linkType: hard
@@ -1190,19 +1190,19 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"markdown-it@npm:>=14.2.0": "markdown-it@npm:14.3.0":
version: 14.2.0 version: 14.3.0
resolution: "markdown-it@npm:14.2.0" resolution: "markdown-it@npm:14.3.0"
dependencies: dependencies:
argparse: "npm:^2.0.1" argparse: "npm:^2.0.1"
entities: "npm:^4.4.0" entities: "npm:^4.5.0"
linkify-it: "npm:^5.0.1" linkify-it: "npm:^5.0.2"
mdurl: "npm:^2.0.0" mdurl: "npm:^2.0.0"
punycode.js: "npm:^2.3.1" punycode.js: "npm:^2.3.1"
uc.micro: "npm:^2.1.0" uc.micro: "npm:^2.1.0"
bin: bin:
markdown-it: bin/markdown-it.mjs markdown-it: bin/markdown-it.mjs
checksum: 10c0/1d3a50061d2fe4efbcf317aac853dbee6892ed6f5a217570eead723f2ef2dd1c9baaeef5a687cd283480c45c2d20724a73e84a9ed72843cf7b3b719067af40ef checksum: 10c0/b2dea908968109d6e9088ac972254bca842157d85d2e6838d0eb263cd8106e7e6a72663b138366cc98f57441d9f3f2ebfb842bf7b2f9e1c13187ebe70e0af8f9
languageName: node languageName: node
linkType: hard linkType: hard