From d82adf4f678cc5ad143fb617d2786432de275c74 Mon Sep 17 00:00:00 2001 From: Mresyzz Date: Sun, 11 Oct 2026 22:18:16 +0800 Subject: [PATCH] fix: keep Pages examples distinct from real runtime verification --- docs/index.html | 207 +++++++++++------------------------------------- 1 file changed, 46 insertions(+), 161 deletions(-) diff --git a/docs/index.html b/docs/index.html index 3f81c37..2439e31 100644 --- a/docs/index.html +++ b/docs/index.html @@ -296,7 +296,7 @@

Debug command not found @@ -316,13 +316,13 @@

- Section 01 • Runtime Simulator + Section 01 • Example walkthrough

- Live Discrepancy Verification + Explore compatibility examples

- Contrast clean syntactic passes with isolated container failures in real time. + Illustrative results only. This page does not run ShellCheck or execute scripts. Use the Action to verify your script in real containers.

@@ -359,7 +359,7 @@

- Editable interactive buffer • changes simulate dynamically + Local editor • edited scripts remain unverified 8 lines
@@ -371,7 +371,7 @@

- Static Linter (ShellCheck 0.10.0) + ShellCheck example output 0 WARNINGS @@ -391,7 +391,7 @@

- OpsScript Gate Runtime (v0.9.4) + OpsScript Gate example output 1 DISTRO FAILED @@ -532,11 +532,17 @@

+

+ Testing a downloading installer? A zero exit code alone does not prove installation succeeded. + Use the installation smoke test guide + to check the installed binary inside each container. +

+
.github/workflows/gate.yml - +
@@ -579,7 +587,7 @@

- Production Ready • Zero Overhead + Runs in your GitHub Actions runner

Ready to secure your scripts across Linux distributions? @@ -593,7 +601,7 @@

- Copy 5-Line Action + Copy Workflow View on GitHub @@ -626,13 +634,15 @@

0 - ? "$ shellcheck script.sh\n" + scWarnings.join('\n') - : "$ shellcheck script.sh\nNo issues detected. Syntax conforms to grammar.\n(Blind spot: linters verify syntax tokens, cannot check if binaries exist)"; - - let logs = []; - let overallStatus = "ALL DISTROS PASSED"; - let statusClass = "bg-[var(--status-pass-bg)] text-[var(--status-pass-text)] border-[var(--status-pass-border)]"; - let showDiag = false; - let diagCode = "Exit Code 0"; - let diagMsg = ""; - - if (missingBin) { - // Missing command caught by container execution! - overallStatus = `MISSING BINARY: ${missingBin} (ALL FAILED)`; - statusClass = "bg-[var(--status-fail-bg)] text-[var(--status-fail-text)] border-[var(--status-fail-border)]"; - showDiag = true; - diagCode = "Exit Code 127"; - diagMsg = `Standard minimal container images (debian-slim, ubuntu, alpine) do not include '${missingBin}' by default. ShellCheck verified the syntax AST, but OpsScript Gate detected that '${missingBin}' is missing at line ${missingBinLine}.`; - - const distros = [ - { d: "debian:12-slim", t: "0.15s" }, - { d: "ubuntu:22.04", t: "0.16s" }, - { d: "ubuntu:24.04", t: "0.16s" }, - { d: "alpine:3.20", t: "0.11s" } - ]; - distros.forEach(item => { - logs.push('
[' + item.d + '] FAIL (' + item.t + ') - Exit 127
/tmp/target_script.sh: line ' + missingBinLine + ': ' + missingBin + ': not found
'); - }); - } else if (isSetEReadAbort) { - // True Unix behavior: read returns 1 on EOF (from { - logs.push('
[' + d + '] FAIL (0.12s) - Exit 1
read: end of file reached via
'); - }); - } else { - logs = [ - '
[debian:12-slim] PASS (0.22s)' + (hasRead ? ' - stdin bound to ', - '
[ubuntu:22.04] PASS (0.24s)' + (hasRead ? ' - stdin bound to ', - '
[ubuntu:24.04] PASS (0.26s)' + (hasRead ? ' - stdin bound to ' - ]; - - if (isAlpineFail) { - overallStatus = "MATRIX DISCREPANCY DETECTED"; - statusClass = "bg-[var(--status-fail-bg)] text-[var(--status-fail-text)] border-[var(--status-fail-border)]"; - showDiag = true; - diagCode = "Exit Code 127"; - diagMsg = "Discrepancy detected on Alpine minimal container: " + alpineReason; - logs.push('
[alpine:3.20] FAIL (0.11s) - Exit 127
/tmp/target_script.sh: ' + alpineReason + '
'); - } else { - logs.push('
[alpine:3.20] PASS (0.18s)
'); - } - } - renderRealApiResponse({ shellcheck: { - status_text: scWarnings.length > 0 ? (scWarnings.length + " WARNINGS") : "0 WARNINGS", - warning_count: scWarnings.length, - output: scText + status_text: "NOT RUN", + warning_count: 0, + output: "This page does not run ShellCheck. Run shellcheck on your script locally or in CI." }, opsscript: { - overall_status: overallStatus, - status_class: statusClass, - terminal_html: logs.join('\n'), - show_diagnostic: showDiag, - diagnostic_code: diagCode, - diagnostic_msg: diagMsg + overall_status: "UNKNOWN — NOT EXECUTED", + status_class: "bg-[var(--surface-muted)] text-[var(--text-muted)] border-[var(--border-medium)]", + terminal_html: "No container execution has taken place. Copy the workflow below to test your script across distributions.", + show_diagnostic: false } }); } @@ -951,10 +834,12 @@

0 ? "font-mono text-xs font-semibold px-2 py-0.5 rounded border bg-[var(--status-warn-bg)] text-[var(--status-warn-text)] border-[var(--status-warn-border)]" : "font-mono text-xs font-semibold px-2 py-0.5 rounded border bg-[var(--status-pass-bg)] text-[var(--status-pass-text)] border-[var(--status-pass-border)]"; @@ -962,7 +847,7 @@