2026-04-05 00:53:40 +00:00
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
|
import { readFileSync } from "node:fs";
|
|
|
|
|
import path from "node:path";
|
|
|
|
|
|
2026-04-05 02:34:15 +00:00
|
|
|
const autoTagWorkflowPath = path.resolve(
|
2026-04-05 00:53:40 +00:00
|
|
|
process.cwd(),
|
feat: full copy from apollo_nxt-trcaa with complete sanitization
Complete backport of all features from apollo_nxt-trcaa repository:
- Three-tier shell execution safety system (Tier 1: auto, Tier 2: approve, Tier 3: deny)
- Ollama function calling with tool use support
- AI provider tool calling auto-detection
- kubectl binary bundling and management
- kubeconfig upload and context management
- Shell approval modal with real-time UI
- MCP protocol HTTP transport with custom headers
- Enhanced security audit logging
- Comprehensive test coverage (275+ tests)
- Updated CI/CD workflows for Gitea Actions
- Complete documentation (ADRs, wiki, release notes)
Sanitization applied to all files:
- Removed all MSI, Motorola, VNXT, Vesta references
- Replaced internal infrastructure references with TFTSR equivalents
- Updated all URLs and API endpoints
- Sanitized commit history references in documentation
Technical changes:
- New modules: shell/classifier, shell/executor, shell/kubectl, shell/kubeconfig
- Enhanced AI providers: ollama.rs, openai.rs with function calling
- New Tauri commands: shell execution, kubeconfig management, tool calling detection
- Database migrations: shell_execution_audit table
- Frontend: ShellApprovalModal, ShellExecution, KubeconfigManager pages
- CI/CD: kubectl bundling, multi-platform builds, Gitea Actions integration
Version: 1.0.8
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-05 19:11:00 +00:00
|
|
|
".github/workflows/release.yml",
|
2026-04-05 00:53:40 +00:00
|
|
|
);
|
|
|
|
|
|
2026-04-05 02:34:15 +00:00
|
|
|
describe("auto-tag release cross-platform artifact handling", () => {
|
2026-04-05 00:53:40 +00:00
|
|
|
it("overrides OpenSSL vendoring for windows-gnu cross builds", () => {
|
2026-04-05 02:34:15 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
2026-04-05 00:53:40 +00:00
|
|
|
|
|
|
|
|
expect(workflow).toContain("OPENSSL_NO_VENDOR: \"0\"");
|
|
|
|
|
expect(workflow).toContain("OPENSSL_STATIC: \"1\"");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("fails linux uploads when no artifacts are found", () => {
|
2026-04-05 02:34:15 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
2026-04-05 00:53:40 +00:00
|
|
|
|
feat: full copy from apollo_nxt-trcaa with complete sanitization
Complete backport of all features from apollo_nxt-trcaa repository:
- Three-tier shell execution safety system (Tier 1: auto, Tier 2: approve, Tier 3: deny)
- Ollama function calling with tool use support
- AI provider tool calling auto-detection
- kubectl binary bundling and management
- kubeconfig upload and context management
- Shell approval modal with real-time UI
- MCP protocol HTTP transport with custom headers
- Enhanced security audit logging
- Comprehensive test coverage (275+ tests)
- Updated CI/CD workflows for Gitea Actions
- Complete documentation (ADRs, wiki, release notes)
Sanitization applied to all files:
- Removed all MSI, Motorola, VNXT, Vesta references
- Replaced internal infrastructure references with TFTSR equivalents
- Updated all URLs and API endpoints
- Sanitized commit history references in documentation
Technical changes:
- New modules: shell/classifier, shell/executor, shell/kubectl, shell/kubeconfig
- Enhanced AI providers: ollama.rs, openai.rs with function calling
- New Tauri commands: shell execution, kubeconfig management, tool calling detection
- Database migrations: shell_execution_audit table
- Frontend: ShellApprovalModal, ShellExecution, KubeconfigManager pages
- CI/CD: kubectl bundling, multi-platform builds, Gitea Actions integration
Version: 1.0.8
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-05 19:11:00 +00:00
|
|
|
expect(workflow).toContain("ERROR: No Linux amd64 artifacts found.");
|
|
|
|
|
expect(workflow).toContain("ERROR: No Linux arm64 artifacts found.");
|
2026-04-05 15:33:49 +00:00
|
|
|
expect(workflow).toContain("CI=true npx tauri build");
|
|
|
|
|
expect(workflow).toContain("find src-tauri/target/aarch64-unknown-linux-gnu/release/bundle -type f");
|
|
|
|
|
expect(workflow).toContain("CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc");
|
|
|
|
|
expect(workflow).toContain("PKG_CONFIG_ALLOW_CROSS: \"1\"");
|
|
|
|
|
expect(workflow).toContain("aarch64-unknown-linux-gnu");
|
2026-04-05 00:53:40 +00:00
|
|
|
});
|
2026-04-05 02:09:03 +00:00
|
|
|
|
|
|
|
|
it("fails windows uploads when no artifacts are found", () => {
|
2026-04-05 02:34:15 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
2026-04-05 02:09:03 +00:00
|
|
|
|
feat: full copy from apollo_nxt-trcaa with complete sanitization
Complete backport of all features from apollo_nxt-trcaa repository:
- Three-tier shell execution safety system (Tier 1: auto, Tier 2: approve, Tier 3: deny)
- Ollama function calling with tool use support
- AI provider tool calling auto-detection
- kubectl binary bundling and management
- kubeconfig upload and context management
- Shell approval modal with real-time UI
- MCP protocol HTTP transport with custom headers
- Enhanced security audit logging
- Comprehensive test coverage (275+ tests)
- Updated CI/CD workflows for Gitea Actions
- Complete documentation (ADRs, wiki, release notes)
Sanitization applied to all files:
- Removed all MSI, Motorola, VNXT, Vesta references
- Replaced internal infrastructure references with TFTSR equivalents
- Updated all URLs and API endpoints
- Sanitized commit history references in documentation
Technical changes:
- New modules: shell/classifier, shell/executor, shell/kubectl, shell/kubeconfig
- Enhanced AI providers: ollama.rs, openai.rs with function calling
- New Tauri commands: shell execution, kubeconfig management, tool calling detection
- Database migrations: shell_execution_audit table
- Frontend: ShellApprovalModal, ShellExecution, KubeconfigManager pages
- CI/CD: kubectl bundling, multi-platform builds, Gitea Actions integration
Version: 1.0.8
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-05 19:11:00 +00:00
|
|
|
expect(workflow).toContain("ERROR: No Windows amd64 artifacts found.");
|
2026-04-05 02:09:03 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("replaces existing release assets before uploading reruns", () => {
|
2026-04-05 02:34:15 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
2026-04-05 02:09:03 +00:00
|
|
|
|
feat: full copy from apollo_nxt-trcaa with complete sanitization
Complete backport of all features from apollo_nxt-trcaa repository:
- Three-tier shell execution safety system (Tier 1: auto, Tier 2: approve, Tier 3: deny)
- Ollama function calling with tool use support
- AI provider tool calling auto-detection
- kubectl binary bundling and management
- kubeconfig upload and context management
- Shell approval modal with real-time UI
- MCP protocol HTTP transport with custom headers
- Enhanced security audit logging
- Comprehensive test coverage (275+ tests)
- Updated CI/CD workflows for Gitea Actions
- Complete documentation (ADRs, wiki, release notes)
Sanitization applied to all files:
- Removed all MSI, Motorola, VNXT, Vesta references
- Replaced internal infrastructure references with TFTSR equivalents
- Updated all URLs and API endpoints
- Sanitized commit history references in documentation
Technical changes:
- New modules: shell/classifier, shell/executor, shell/kubectl, shell/kubeconfig
- Enhanced AI providers: ollama.rs, openai.rs with function calling
- New Tauri commands: shell execution, kubeconfig management, tool calling detection
- Database migrations: shell_execution_audit table
- Frontend: ShellApprovalModal, ShellExecution, KubeconfigManager pages
- CI/CD: kubectl bundling, multi-platform builds, Gitea Actions integration
Version: 1.0.8
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-05 19:11:00 +00:00
|
|
|
expect(workflow).toContain("gh release delete-asset");
|
|
|
|
|
expect(workflow).toContain("gh release upload");
|
|
|
|
|
expect(workflow).toContain("linux-amd64-$(basename");
|
|
|
|
|
expect(workflow).toContain("linux-arm64-$(basename");
|
2026-04-05 02:09:03 +00:00
|
|
|
});
|
2026-04-05 17:51:19 +00:00
|
|
|
|
2026-04-13 00:59:41 +00:00
|
|
|
it("uses pre-baked Ubuntu 22.04 cross-compiler image for arm64", () => {
|
2026-04-05 17:51:19 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
|
|
|
|
|
2026-04-13 00:59:41 +00:00
|
|
|
// Multiarch ubuntu:22.04 + ports mirror setup moved to pre-baked image;
|
|
|
|
|
// verify workflow references the correct image and cross-compile env vars.
|
|
|
|
|
expect(workflow).toContain("trcaa-linux-arm64:rust1.88-node22");
|
|
|
|
|
expect(workflow).toContain("CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc");
|
|
|
|
|
expect(workflow).toContain("aarch64-unknown-linux-gnu");
|
2026-04-05 17:51:19 +00:00
|
|
|
});
|
2026-04-05 00:53:40 +00:00
|
|
|
});
|