Merge branch 'main' into audit-agent-fix-2548023414882189291

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-14 01:23:03 -05:00
commit ec8969dde7
18 files changed
+407 -11

No files matched your search

-1
View File
@@ -93,4 +93,3 @@ NOSTR_LOCK_NAMESPACE=my-project \
AGENT_PLATFORM=codex \ AGENT_PLATFORM=codex \
node src/nostr-lock.mjs lock --agent docs-agent --cadence daily node src/nostr-lock.mjs lock --agent docs-agent --cadence daily
``` ```
@@ -0,0 +1,39 @@
> [email protected] test
> node --test test/*.test.mjs
TAP version 13
# Subtest: CLI Smoke Test
# Subtest: should print usage when no args provided
ok 1 - should print usage when no args provided
---
duration_ms: 164.342148
type: 'test'
...
# Subtest: should fail when checking without cadence
ok 2 - should fail when checking without cadence
---
duration_ms: 146.141257
type: 'test'
...
# Subtest: should include paused agents in check output
ok 3 - should include paused agents in check output
---
duration_ms: 15204.078541
type: 'test'
...
1..3
ok 1 - CLI Smoke Test
---
duration_ms: 15516.416385
type: 'suite'
...
1..1
# tests 3
# suites 1
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 15615.275486
@@ -0,0 +1,39 @@
> [email protected] test
> node --test test/*.test.mjs
TAP version 13
# Subtest: CLI Smoke Test
# Subtest: should print usage when no args provided
ok 1 - should print usage when no args provided
---
duration_ms: 147.776345
type: 'test'
...
# Subtest: should fail when checking without cadence
ok 2 - should fail when checking without cadence
---
duration_ms: 147.972417
type: 'test'
...
# Subtest: should include paused agents in check output
ok 3 - should include paused agents in check output
---
duration_ms: 15197.12841
type: 'test'
...
1..3
ok 1 - CLI Smoke Test
---
duration_ms: 15494.825761
type: 'suite'
...
1..1
# tests 3
# suites 1
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 15604.898805
@@ -0,0 +1,39 @@
> [email protected] test
> node --test test/*.test.mjs
TAP version 13
# Subtest: CLI Smoke Test
# Subtest: should print usage when no args provided
ok 1 - should print usage when no args provided
---
duration_ms: 183.111536
type: 'test'
...
# Subtest: should fail when checking without cadence
ok 2 - should fail when checking without cadence
---
duration_ms: 190.338778
type: 'test'
...
# Subtest: should include paused agents in check output
ok 3 - should include paused agents in check output
---
duration_ms: 15211.189441
type: 'test'
...
1..3
ok 1 - CLI Smoke Test
---
duration_ms: 15587.030568
type: 'suite'
...
1..1
# tests 3
# suites 1
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 15699.937383
@@ -0,0 +1,39 @@
> [email protected] test
> node --test test/*.test.mjs
TAP version 13
# Subtest: CLI Smoke Test
# Subtest: should print usage when no args provided
ok 1 - should print usage when no args provided
---
duration_ms: 142.251019
type: 'test'
...
# Subtest: should fail when checking without cadence
ok 2 - should fail when checking without cadence
---
duration_ms: 144.9939
type: 'test'
...
# Subtest: should include paused agents in check output
ok 3 - should include paused agents in check output
---
duration_ms: 15190.488726
type: 'test'
...
1..3
ok 1 - CLI Smoke Test
---
duration_ms: 15479.56569
type: 'suite'
...
1..1
# tests 3
# suites 1
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 15572.457433
@@ -0,0 +1,39 @@
> [email protected] test
> node --test test/*.test.mjs
TAP version 13
# Subtest: CLI Smoke Test
# Subtest: should print usage when no args provided
ok 1 - should print usage when no args provided
---
duration_ms: 142.641512
type: 'test'
...
# Subtest: should fail when checking without cadence
ok 2 - should fail when checking without cadence
---
duration_ms: 143.41358
type: 'test'
...
# Subtest: should include paused agents in check output
ok 3 - should include paused agents in check output
---
duration_ms: 15193.256229
type: 'test'
...
1..3
ok 1 - CLI Smoke Test
---
duration_ms: 15481.218226
type: 'suite'
...
1..1
# tests 3
# suites 1
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 15574.942449
+21
View File
@@ -0,0 +1,21 @@
# CI Health Check Report - Sat Feb 14 06:10:49 UTC 2026
Running 5 iterations of npm test...
## Iteration 1
Timestamp: Sat Feb 14 06:10:49 UTC 2026
Status: PASSED
## Iteration 2
Timestamp: Sat Feb 14 06:11:05 UTC 2026
Status: PASSED
## Iteration 3
Timestamp: Sat Feb 14 06:11:21 UTC 2026
Status: PASSED
## Iteration 4
Timestamp: Sat Feb 14 06:11:37 UTC 2026
Status: PASSED
## Iteration 5
Timestamp: Sat Feb 14 06:11:53 UTC 2026
Status: PASSED
+33
View File
@@ -0,0 +1,33 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="handleGrad" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#4A5568"/>
<stop offset="100%" stop-color="#2D3748"/>
</linearGradient>
<linearGradient id="flameGrad" x1="32" y1="4" x2="32" y2="44" gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#FFD700"/>
<stop offset="40%" stop-color="#FF8C00"/>
<stop offset="100%" stop-color="#FF4500"/>
</linearGradient>
</defs>
<!-- Handle -->
<path d="M26 42 L29 60 L35 60 L38 42 Z" fill="url(#handleGrad)"/>
<rect x="24" y="40" width="16" height="4" rx="1" fill="#718096"/>
<!-- Flame Body -->
<path d="M32 2
C32 2 16 18 16 30
C16 38 22 42 32 42
C42 42 48 38 48 30
C48 18 32 2 32 2Z"
fill="url(#flameGrad)"/>
<!-- Inner Flame Highlight -->
<path d="M32 10
C32 10 22 22 22 30
C22 36 26 38 32 38
C38 38 42 36 42 30
C42 22 32 10 32 10Z"
fill="#FFF700" opacity="0.4"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+33
View File
@@ -0,0 +1,33 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="handleGrad" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#4A5568"/>
<stop offset="100%" stop-color="#2D3748"/>
</linearGradient>
<linearGradient id="flameGrad" x1="32" y1="4" x2="32" y2="44" gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#FFD700"/>
<stop offset="40%" stop-color="#FF8C00"/>
<stop offset="100%" stop-color="#FF4500"/>
</linearGradient>
</defs>
<!-- Handle -->
<path d="M26 42 L29 60 L35 60 L38 42 Z" fill="url(#handleGrad)"/>
<rect x="24" y="40" width="16" height="4" rx="1" fill="#718096"/>
<!-- Flame Body -->
<path d="M32 2
C32 2 16 18 16 30
C16 38 22 42 32 42
C42 42 48 38 48 30
C48 18 32 2 32 2Z"
fill="url(#flameGrad)"/>
<!-- Inner Flame Highlight -->
<path d="M32 10
C32 10 22 22 22 30
C22 36 26 38 32 38
C38 38 42 36 42 30
C42 22 32 10 32 10Z"
fill="#FFF700" opacity="0.4"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+9
View File
@@ -11,6 +11,7 @@ const DASHBOARD_SRC = path.join(__dirname, 'dashboard');
const DOCS_SRC = path.join(__dirname, 'src', 'docs'); const DOCS_SRC = path.join(__dirname, 'src', 'docs');
const PROMPTS_SRC = path.join(__dirname, 'src', 'prompts', 'META_PROMPTS.md'); const PROMPTS_SRC = path.join(__dirname, 'src', 'prompts', 'META_PROMPTS.md');
const CONFIG_SRC = path.join(__dirname, 'torch-config.json'); const CONFIG_SRC = path.join(__dirname, 'torch-config.json');
const ASSETS_SRC = path.join(__dirname, 'assets');
// Ensure clean slate // Ensure clean slate
if (fs.existsSync(DIST_DIR)) { if (fs.existsSync(DIST_DIR)) {
@@ -27,6 +28,7 @@ let distHtml = landingHtml;
distHtml = distHtml.replace(/"\.\.\/dashboard\/styles\.css"/g, '"dashboard/styles.css"'); distHtml = distHtml.replace(/"\.\.\/dashboard\/styles\.css"/g, '"dashboard/styles.css"');
distHtml = distHtml.replace(/"\.\.\/dashboard\/"/g, '"dashboard/"'); // Link to dashboard distHtml = distHtml.replace(/"\.\.\/dashboard\/"/g, '"dashboard/"'); // Link to dashboard
distHtml = distHtml.replace(/'\.\.\/src\/docs\/TORCH\.md'/g, "'src/docs/TORCH.md'"); distHtml = distHtml.replace(/'\.\.\/src\/docs\/TORCH\.md'/g, "'src/docs/TORCH.md'");
distHtml = distHtml.replace(/"\.\.\/assets\//g, '"assets/');
fs.writeFileSync(path.join(DIST_DIR, 'index.html'), distHtml); fs.writeFileSync(path.join(DIST_DIR, 'index.html'), distHtml);
@@ -52,4 +54,11 @@ if (fs.existsSync(CONFIG_SRC)) {
fs.copyFileSync(CONFIG_SRC, path.join(DIST_DIR, 'torch-config.json')); fs.copyFileSync(CONFIG_SRC, path.join(DIST_DIR, 'torch-config.json'));
} }
// 6. Copy assets/ -> dist/assets/
const distAssets = path.join(DIST_DIR, 'assets');
if (fs.existsSync(ASSETS_SRC)) {
fs.mkdirSync(distAssets, { recursive: true });
fs.cpSync(ASSETS_SRC, distAssets, { recursive: true });
}
console.log('Build complete! Output directory: dist/'); console.log('Build complete! Output directory: dist/');
+2
View File
@@ -5,6 +5,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TORCH Agent Dashboard</title> <title>TORCH Agent Dashboard</title>
<link rel="icon" type="image/svg+xml" href="../assets/favicon.svg">
<link rel="stylesheet" href="./styles.css" /> <link rel="stylesheet" href="./styles.css" />
</head> </head>
<body> <body>
@@ -13,6 +14,7 @@
<!-- Header --> <!-- Header -->
<header class="mb-8"> <header class="mb-8">
<div class="flex items-center gap-3 mb-2"> <div class="flex items-center gap-3 mb-2">
<img src="../assets/logo.svg" alt="TORCH Logo" width="32" height="32">
<h1 class="text-2xl font-semibold text-text-strong"> <h1 class="text-2xl font-semibold text-text-strong">
TORCH Agent Dashboard TORCH Agent Dashboard
</h1> </h1>
+2 -7
View File
@@ -4,6 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TORCH: AI Workforce Orchestration</title> <title>TORCH: AI Workforce Orchestration</title>
<link rel="icon" type="image/svg+xml" href="../assets/favicon.svg">
<link rel="stylesheet" href="../dashboard/styles.css"> <link rel="stylesheet" href="../dashboard/styles.css">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<style> <style>
@@ -347,13 +348,7 @@
<header> <header>
<div class="logo-container"> <div class="logo-container">
<!-- Modern Torch SVG Logo --> <img src="../assets/logo.svg" alt="TORCH Logo" width="32" height="32">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 2L19 10L24 12L18 16L20 22L16 18L12 22L14 16L8 12L13 10L16 2Z" fill="#F5B84B"/>
<path d="M16 18V30" stroke="#4F8CFF" stroke-width="3" stroke-linecap="round"/>
<path d="M12 24H20" stroke="#4F8CFF" stroke-width="3" stroke-linecap="round"/>
<circle cx="16" cy="10" r="6" stroke="#F5B84B" stroke-width="2" stroke-opacity="0.5"/>
</svg>
TORCH TORCH
</div> </div>
<nav> <nav>
+16
View File
@@ -252,6 +252,22 @@
"url": "https://paulmillr.com/funding/" "url": "https://paulmillr.com/funding/"
} }
}, },
"node_modules/@playwright/test": {
"version": "1.58.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.2.tgz",
"integrity": "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.58.2"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@scure/base": { "node_modules/@scure/base": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
+71
View File
@@ -0,0 +1,71 @@
import { chromium } from '@playwright/test';
import fs from 'fs';
import path from 'path';
const LOG_FILE = 'artifacts/debug_frontend.log';
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
const errors = [];
const logStream = fs.createWriteStream(LOG_FILE, { flags: 'w' });
const log = (msg) => {
console.log(msg);
logStream.write(msg + '\n');
};
log(`[${new Date().toISOString()}] Starting debug session...`);
page.on('console', msg => {
const text = msg.text();
const type = msg.type();
const output = `[console:${type}] ${text}`;
if (type === 'error') {
log(output);
errors.push(output);
} else {
// Log non-errors only to file to reduce noise, or log everything?
// For debugging, everything is useful.
log(output);
}
});
page.on('pageerror', err => {
const output = `[pageerror] ${err.message}\n${err.stack}`;
log(output);
errors.push(output);
});
page.on('requestfailed', request => {
const failure = request.failure();
const errorText = failure ? failure.errorText : 'Unknown error';
const output = `[requestfailed] ${request.url()} - ${errorText}`;
log(output);
errors.push(output);
});
try {
log(`Navigating to http://localhost:4173/dashboard/...`);
await page.goto('http://localhost:4173/dashboard/', { waitUntil: 'networkidle', timeout: 10000 });
log(`Navigation complete.`);
// Give it a bit more time for any delayed errors
await page.waitForTimeout(2000);
} catch (e) {
log(`[script:error] Navigation failed or timeout: ${e.message}`);
errors.push(`Navigation failed: ${e.message}`);
}
await browser.close();
// Don't close stream immediately as logs might still be flushing? No, synchronous write.
await new Promise(resolve => logStream.end(resolve));
if (errors.length > 0) {
console.error(`\nFound ${errors.length} errors.`);
process.exit(1);
} else {
console.log(`\nNo errors found.`);
process.exit(0);
}
})();
-3
View File
@@ -1,3 +0,0 @@
127.0.0.1 - - [14/Feb/2026 05:24:39] "GET /dashboard/index.html HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2026 05:24:39] "GET /dashboard/styles.css HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2026 05:24:40] "GET /torch-config.json HTTP/1.1" 200 -
@@ -0,0 +1,6 @@
# Agent: ci-health-agent
# Status: completed
Executed local CI health check.
Ran 5 iterations of `npm test`. All passed.
Artifact: `artifacts/ci-health-checks/results.md`
@@ -0,0 +1 @@
Feature proposed: features/validate-logs.js
@@ -0,0 +1,18 @@
# Frontend Console Debug Agent - Weekly Run
**Timestamp:** 2026-02-14T06:16:09Z
**Status:** Completed
**Result:** No errors found.
## Summary
- Installed `@playwright/test` and browser binaries.
- Created `scripts/agent/debug-frontend.mjs` to capture console logs.
- Ran capture against `http://localhost:4173/dashboard/`.
- Found 0 console errors and 0 failed requests.
- Validated graceful handling of optional config loading.
## Artifacts
- `scripts/agent/debug-frontend.mjs` (Script created)
- `artifacts/debug_frontend.log` (Log file, not committed)