From 1fbc35326286e5cfd5171ddaa84666caec258481 Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:39:13 +0700 Subject: [PATCH 1/9] fix: use verified staging Control API endpoint --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5ad5908..089daee 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@ let current='overview',connections=[]; let dashboardRequestSequence=0; let dashboardAbortController=null; -const CONTROL_API_BASE='https://ocodejs-server-api-staging.ocodejs-df1.workers.dev/api/v1'; +const CONTROL_API_BASE='https://ocodejs-server-api-staging.huynhthuongg2505-f9b.workers.dev/api/v1'; const MCP_ENDPOINT='https://ocodejs-mcp-staging.huynhthuongg2505-f9b.workers.dev/mcp'; const services=[['AI Agent Runtime','Điều phối tác vụ agent','Chưa kết nối','off','—'],['API Gateway','Định tuyến API & rate limits','Chưa kết nối','off','—'],['Identity / Auth','OAuth · session · account','Chưa kết nối','off','—'],['MCP Registry','Quản lý MCP endpoints','Chưa kết nối','off','—'],['Developer Telemetry','Logs · metrics · traces','Chưa kết nối','off','—']]; const endpoints=[['GET','/api/v1','API metadata và route index','STAGING LIVE'],['GET','/api/v1/health/live','Liveness probe','STAGING LIVE'],['GET','/api/v1/health/ready','Readiness probe','STAGING LIVE'],['GET','/api/v1/services','Service Registry','STAGING LIVE'],['GET','/api/v1/services/{serviceId}','Chi tiết một service','STAGING LIVE'],['GET','/api/v1/providers','Provider Registry (read-only)','STAGING LIVE'],['GET','/api/v1/providers/{providerId}','Provider adapter detail','STAGING LIVE'],['GET','/api/v1/agents','Agent Registry (read-only)','STAGING LIVE'],['GET','/api/v1/agents/{agentId}','Agent definition versioned','STAGING LIVE'],['GET','/api/v1/mcp/connections','MCP Connection Registry','STAGING LIVE'],['GET','/api/v1/mcp/connections/{connectionId}','MCP connection detail','STAGING LIVE']]; From bae5cb2376bdacb7e088417c1191978544f4e84a Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:39:50 +0700 Subject: [PATCH 2/9] test: validate verified staging Worker origin in CI --- scripts/check-control-api-staging.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-control-api-staging.mjs b/scripts/check-control-api-staging.mjs index bb94e8e..a748055 100644 --- a/scripts/check-control-api-staging.mjs +++ b/scripts/check-control-api-staging.mjs @@ -1,4 +1,4 @@ -const BASE = (process.env.CONTROL_API_BASE || "https://api-staging.ocodejs.co/api/v1").replace(/\/$/, ""); +const BASE = (process.env.CONTROL_API_BASE || "https://ocodejs-server-api-staging.huynhthuongg2505-f9b.workers.dev/api/v1").replace(/\/$/, ""); const ORIGIN = "https://ocodejs.co"; const MAX_AGE_MS = 60_000; From b96db0f08600b2f5a314902d3eb48e1b18efc44c Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:40:44 +0700 Subject: [PATCH 3/9] test: add public ecosystem HTTP smoke checks --- scripts/check-ecosystem-http.mjs | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/check-ecosystem-http.mjs diff --git a/scripts/check-ecosystem-http.mjs b/scripts/check-ecosystem-http.mjs new file mode 100644 index 0000000..1e41b06 --- /dev/null +++ b/scripts/check-ecosystem-http.mjs @@ -0,0 +1,37 @@ +// Diagnostic-only smoke test; this branch is not intended for production deployment. +const targets = [ + { name: "OCodeJS docs custom domain", url: "https://ocodejs.co/docs/" }, + { name: "OCodeJS homepage custom domain", url: "https://ocodejs.co/" }, + { name: "OCodeJS CLI Hub custom route", url: "https://ocodejs.co/cli-hub/" }, + { name: "OCodeJS CLI Hub canonical Pages", url: "https://ocodejs.github.io/cli-hub/" }, + { name: "Ask OCodeJS Pages", url: "https://zskbot.github.io/ask-ocodejs/" }, + { name: "VelclawHost Pages overview", url: "https://velclaw.github.io/VelclawHost/#/overview" } +]; + +const results = await Promise.all(targets.map(async (target) => { + try { + const response = await fetch(target.url, { + redirect: "follow", + cache: "no-store", + signal: AbortSignal.timeout(20000), + headers: { "user-agent": "OCodeJS-Ecosystem-HTTP-Smoke/1.0", accept: "text/html,application/xhtml+xml" } + }); + const body = await response.text(); + const title = body.match(/]*>([\\s\\S]*?)<\\/title>/i)?.[1]?.replace(/\\s+/g, " ").trim() || null; + return { + name: target.name, + requestedUrl: target.url, + status: response.status, + ok: response.status === 200, + finalUrl: response.url, + contentType: response.headers.get("content-type"), + bytes: Buffer.byteLength(body), + title + }; + } catch (error) { + return { name: target.name, requestedUrl: target.url, ok: false, error: error?.cause?.code || error?.message || "fetch failed" }; + } +})); + +console.log(JSON.stringify({ checkedAt: new Date().toISOString(), total: results.length, passed: results.filter((item) => item.ok).length, failed: results.filter((item) => !item.ok).length, results }, null, 2)); +if (results.some((item) => !item.ok)) process.exitCode = 1; From bc017dee89cad7f2477640d007e04469ef4948b8 Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:40:47 +0700 Subject: [PATCH 4/9] ci: verify live ecosystem Pages URLs from PR checks --- .github/workflows/control-api-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/control-api-tests.yml b/.github/workflows/control-api-tests.yml index f6b5655..4c0521e 100644 --- a/.github/workflows/control-api-tests.yml +++ b/.github/workflows/control-api-tests.yml @@ -12,6 +12,7 @@ on: - "scripts/check-doc-links.mjs" - "scripts/check-mcp-staging.mjs" - "scripts/check-control-api-staging.mjs" + - "scripts/check-ecosystem-http.mjs" - "ocodejs-pages-theme.css" - "docs/**" - "README.md" @@ -60,3 +61,5 @@ jobs: run: node scripts/check-mcp-staging.mjs - name: Smoke test deployed Control API staging and custom-domain CORS run: node scripts/check-control-api-staging.mjs + - name: Check public ecosystem Pages HTTP + run: node scripts/check-ecosystem-http.mjs From 4d7ce96622c13f404157d25f531829f855a63e2c Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:41:06 +0700 Subject: [PATCH 5/9] fix: correct title extraction in HTTP smoke script --- scripts/check-ecosystem-http.mjs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/check-ecosystem-http.mjs b/scripts/check-ecosystem-http.mjs index 1e41b06..5079d4b 100644 --- a/scripts/check-ecosystem-http.mjs +++ b/scripts/check-ecosystem-http.mjs @@ -17,7 +17,16 @@ const results = await Promise.all(targets.map(async (target) => { headers: { "user-agent": "OCodeJS-Ecosystem-HTTP-Smoke/1.0", accept: "text/html,application/xhtml+xml" } }); const body = await response.text(); - const title = body.match(/]*>([\\s\\S]*?)<\\/title>/i)?.[1]?.replace(/\\s+/g, " ").trim() || null; + let title = null; + const lowerBody = body.toLowerCase(); + const titleStart = lowerBody.indexOf("= 0) { + const titleOpen = lowerBody.indexOf(">", titleStart); + const titleClose = lowerBody.indexOf("", titleOpen + 1); + if (titleOpen >= 0 && titleClose > titleOpen) { + title = body.slice(titleOpen + 1, titleClose).replaceAll("\\n", " ").replaceAll("\\r", " ").trim(); + } + } return { name: target.name, requestedUrl: target.url, From 4c6ab103e4e839a768d379227ff8ec0d03ab5290 Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:41:47 +0700 Subject: [PATCH 6/9] test: expand public Pages coverage for www and standalone CLI Hub --- scripts/check-ecosystem-http.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/check-ecosystem-http.mjs b/scripts/check-ecosystem-http.mjs index 5079d4b..483934b 100644 --- a/scripts/check-ecosystem-http.mjs +++ b/scripts/check-ecosystem-http.mjs @@ -2,8 +2,10 @@ const targets = [ { name: "OCodeJS docs custom domain", url: "https://ocodejs.co/docs/" }, { name: "OCodeJS homepage custom domain", url: "https://ocodejs.co/" }, + { name: "OCodeJS www custom domain", url: "https://www.ocodejs.co/" }, { name: "OCodeJS CLI Hub custom route", url: "https://ocodejs.co/cli-hub/" }, { name: "OCodeJS CLI Hub canonical Pages", url: "https://ocodejs.github.io/cli-hub/" }, + { name: "OCodeJS CLI Hub standalone Pages", url: "https://zskbot.github.io/ocodejs-cli/" }, { name: "Ask OCodeJS Pages", url: "https://zskbot.github.io/ask-ocodejs/" }, { name: "VelclawHost Pages overview", url: "https://velclaw.github.io/VelclawHost/#/overview" } ]; From b296c7f5d92998f228c2effc0e8636a355c71f0a Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:42:24 +0700 Subject: [PATCH 7/9] test: verify built JavaScript assets for live SPA pages --- scripts/check-ecosystem-http.mjs | 34 ++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/scripts/check-ecosystem-http.mjs b/scripts/check-ecosystem-http.mjs index 483934b..3666875 100644 --- a/scripts/check-ecosystem-http.mjs +++ b/scripts/check-ecosystem-http.mjs @@ -29,15 +29,45 @@ const results = await Promise.all(targets.map(async (target) => { title = body.slice(titleOpen + 1, titleClose).replaceAll("\\n", " ").replaceAll("\\r", " ").trim(); } } + let scriptAsset = null; + const scriptStart = lowerBody.indexOf("= 0) { + const scriptEnd = lowerBody.indexOf(">", scriptStart); + const scriptTag = body.slice(scriptStart, scriptEnd + 1); + const srcIndex = scriptTag.toLowerCase().indexOf("src="); + if (srcIndex >= 0) { + const quote = scriptTag[srcIndex + 4]; + const quoteEnd = scriptTag.indexOf(quote, srcIndex + 5); + const src = scriptTag.slice(srcIndex + 5, quoteEnd); + const assetUrl = new URL(src, response.url); + const assetResponse = await fetch(assetUrl, { + redirect: "follow", + cache: "no-store", + signal: AbortSignal.timeout(20000), + headers: { "user-agent": "OCodeJS-Ecosystem-HTTP-Smoke/1.0", accept: "*/*" } + }); + const assetBody = await assetResponse.arrayBuffer(); + const assetType = assetResponse.headers.get("content-type") || ""; + scriptAsset = { + src, + status: assetResponse.status, + contentType: assetType, + bytes: assetBody.byteLength, + ok: assetResponse.status === 200 && (assetType.includes("javascript") || assetType.includes("ecmascript")) + }; + } + } + const pageOk = response.status === 200; return { name: target.name, requestedUrl: target.url, status: response.status, - ok: response.status === 200, + ok: pageOk && (!scriptAsset || scriptAsset.ok), finalUrl: response.url, contentType: response.headers.get("content-type"), bytes: Buffer.byteLength(body), - title + title, + scriptAsset }; } catch (error) { return { name: target.name, requestedUrl: target.url, ok: false, error: error?.cause?.code || error?.message || "fetch failed" }; From 1105af416c82f945c23cb585edba7a567ec1c379 Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:42:49 +0700 Subject: [PATCH 8/9] ci: keep public Pages diagnostics separate from Control API gate --- .github/workflows/control-api-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/control-api-tests.yml b/.github/workflows/control-api-tests.yml index 4c0521e..f6b5655 100644 --- a/.github/workflows/control-api-tests.yml +++ b/.github/workflows/control-api-tests.yml @@ -12,7 +12,6 @@ on: - "scripts/check-doc-links.mjs" - "scripts/check-mcp-staging.mjs" - "scripts/check-control-api-staging.mjs" - - "scripts/check-ecosystem-http.mjs" - "ocodejs-pages-theme.css" - "docs/**" - "README.md" @@ -61,5 +60,3 @@ jobs: run: node scripts/check-mcp-staging.mjs - name: Smoke test deployed Control API staging and custom-domain CORS run: node scripts/check-control-api-staging.mjs - - name: Check public ecosystem Pages HTTP - run: node scripts/check-ecosystem-http.mjs From 6f3fe314bfe0c4e5b5e4a09d10be30909a0a07d3 Mon Sep 17 00:00:00 2001 From: zskbot <241179063+zskbot@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:42:52 +0700 Subject: [PATCH 9/9] chore: keep one-off ecosystem smoke out of release PR --- scripts/check-ecosystem-http.mjs | 78 -------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 scripts/check-ecosystem-http.mjs diff --git a/scripts/check-ecosystem-http.mjs b/scripts/check-ecosystem-http.mjs deleted file mode 100644 index 3666875..0000000 --- a/scripts/check-ecosystem-http.mjs +++ /dev/null @@ -1,78 +0,0 @@ -// Diagnostic-only smoke test; this branch is not intended for production deployment. -const targets = [ - { name: "OCodeJS docs custom domain", url: "https://ocodejs.co/docs/" }, - { name: "OCodeJS homepage custom domain", url: "https://ocodejs.co/" }, - { name: "OCodeJS www custom domain", url: "https://www.ocodejs.co/" }, - { name: "OCodeJS CLI Hub custom route", url: "https://ocodejs.co/cli-hub/" }, - { name: "OCodeJS CLI Hub canonical Pages", url: "https://ocodejs.github.io/cli-hub/" }, - { name: "OCodeJS CLI Hub standalone Pages", url: "https://zskbot.github.io/ocodejs-cli/" }, - { name: "Ask OCodeJS Pages", url: "https://zskbot.github.io/ask-ocodejs/" }, - { name: "VelclawHost Pages overview", url: "https://velclaw.github.io/VelclawHost/#/overview" } -]; - -const results = await Promise.all(targets.map(async (target) => { - try { - const response = await fetch(target.url, { - redirect: "follow", - cache: "no-store", - signal: AbortSignal.timeout(20000), - headers: { "user-agent": "OCodeJS-Ecosystem-HTTP-Smoke/1.0", accept: "text/html,application/xhtml+xml" } - }); - const body = await response.text(); - let title = null; - const lowerBody = body.toLowerCase(); - const titleStart = lowerBody.indexOf("= 0) { - const titleOpen = lowerBody.indexOf(">", titleStart); - const titleClose = lowerBody.indexOf("", titleOpen + 1); - if (titleOpen >= 0 && titleClose > titleOpen) { - title = body.slice(titleOpen + 1, titleClose).replaceAll("\\n", " ").replaceAll("\\r", " ").trim(); - } - } - let scriptAsset = null; - const scriptStart = lowerBody.indexOf("= 0) { - const scriptEnd = lowerBody.indexOf(">", scriptStart); - const scriptTag = body.slice(scriptStart, scriptEnd + 1); - const srcIndex = scriptTag.toLowerCase().indexOf("src="); - if (srcIndex >= 0) { - const quote = scriptTag[srcIndex + 4]; - const quoteEnd = scriptTag.indexOf(quote, srcIndex + 5); - const src = scriptTag.slice(srcIndex + 5, quoteEnd); - const assetUrl = new URL(src, response.url); - const assetResponse = await fetch(assetUrl, { - redirect: "follow", - cache: "no-store", - signal: AbortSignal.timeout(20000), - headers: { "user-agent": "OCodeJS-Ecosystem-HTTP-Smoke/1.0", accept: "*/*" } - }); - const assetBody = await assetResponse.arrayBuffer(); - const assetType = assetResponse.headers.get("content-type") || ""; - scriptAsset = { - src, - status: assetResponse.status, - contentType: assetType, - bytes: assetBody.byteLength, - ok: assetResponse.status === 200 && (assetType.includes("javascript") || assetType.includes("ecmascript")) - }; - } - } - const pageOk = response.status === 200; - return { - name: target.name, - requestedUrl: target.url, - status: response.status, - ok: pageOk && (!scriptAsset || scriptAsset.ok), - finalUrl: response.url, - contentType: response.headers.get("content-type"), - bytes: Buffer.byteLength(body), - title, - scriptAsset - }; - } catch (error) { - return { name: target.name, requestedUrl: target.url, ok: false, error: error?.cause?.code || error?.message || "fetch failed" }; - } -})); - -console.log(JSON.stringify({ checkedAt: new Date().toISOString(), total: results.length, passed: results.filter((item) => item.ok).length, failed: results.filter((item) => !item.ok).length, results }, null, 2)); -if (results.some((item) => !item.ok)) process.exitCode = 1;