mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-01 02:11:54 +00:00
Merge branch 'main' into agents/daily/log-fixer-agent-2026-02-16-13770463431702119028
This commit is contained in:
98 files changed
+2728
-420
No files matched your search
@@ -1,3 +1,2 @@
|
||||
node_modules
|
||||
dist/
|
||||
.scheduler-memory/
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "retrieve",
|
||||
"runId": "adffd02af53cf5fb38e640608155fae3aa10adac6249a4d3e462c8f5b56ac6b7",
|
||||
"servicePath": "src/services/memory/index.js#getRelevantMemories",
|
||||
"inputs": {
|
||||
"agentId": "style-agent",
|
||||
"promptPath": "src/prompts/daily/style-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"query": "scheduler | daily | agent | style-agent | intent | Required startup + artifacts + memory + issue capture",
|
||||
"events": 1
|
||||
},
|
||||
"outputs": {
|
||||
"ingestedCount": 1,
|
||||
"retrievedCount": 1
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "store",
|
||||
"runId": "adffd02af53cf5fb38e640608155fae3aa10adac6249a4d3e462c8f5b56ac6b7",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "style-agent",
|
||||
"promptPath": "src/prompts/daily/style-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"events": 1,
|
||||
"sourceFile": "memory-update.md"
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"Lint passed, no changes needed."
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "retrieve",
|
||||
"runId": "initial-seed",
|
||||
"servicePath": "src/services/memory/index.js#getRelevantMemories",
|
||||
"inputs": {
|
||||
"agentId": "onboarding-audit-agent",
|
||||
"promptPath": "src/prompts/daily/onboarding-audit-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"query": "scheduler | daily | agent | onboarding-audit-agent | intent | Required startup + artifacts + memory + issue capture",
|
||||
"events": 1
|
||||
},
|
||||
"outputs": {
|
||||
"ingestedCount": 1,
|
||||
"retrievedCount": 2
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "store",
|
||||
"runId": "initial-seed",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "onboarding-audit-agent",
|
||||
"promptPath": "src/prompts/daily/onboarding-audit-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"events": 2
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"Store memory event A for daily :: Required startup + artifacts + memory + issue capture Store memory event B for daily :: Required startup + artifacts + memory + issue capture"
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1 @@
|
||||
- Memory retrieval seed for daily :: Required startup + artifacts + memory + issue capture
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1 @@
|
||||
- Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1,250 @@
|
||||
[
|
||||
[
|
||||
"638c2d47-3218-42f5-bc2d-e3adeb4626d0",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "638c2d47-3218-42f5-bc2d-e3adeb4626d0",
|
||||
"agent_id": "test-agent",
|
||||
"session_id": "test-run",
|
||||
"type": "batch_window",
|
||||
"content": "Store memory event A for daily :: scheduler memory store\nStore memory event B for daily :: scheduler memory store",
|
||||
"summary": "Store memory event A for daily :: scheduler memory store Store memory event B for daily :: scheduler memory store",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"store"
|
||||
],
|
||||
"importance": 0.55,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771295950236,
|
||||
"last_seen": 1771295958659,
|
||||
"source": "scheduler-store",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"5c458e0c-8239-46f9-99d1-b61cf05acc34",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "5c458e0c-8239-46f9-99d1-b61cf05acc34",
|
||||
"agent_id": "test-agent",
|
||||
"session_id": "test-run-2",
|
||||
"type": "batch_window",
|
||||
"content": "Memory retrieval seed for daily :: scheduler memory retrieval",
|
||||
"summary": "Memory retrieval seed for daily :: scheduler memory retrieval",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"retrieve"
|
||||
],
|
||||
"importance": 0.4,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771295958645,
|
||||
"last_seen": 1771295958659,
|
||||
"source": "scheduler-retrieve",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"2e9129bd-c366-4d82-ac2b-7e50574532a9",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "2e9129bd-c366-4d82-ac2b-7e50574532a9",
|
||||
"agent_id": "onboarding-audit-agent",
|
||||
"session_id": "initial-seed",
|
||||
"type": "batch_window",
|
||||
"content": "Store memory event A for daily :: Required startup + artifacts + memory + issue capture\nStore memory event B for daily :: Required startup + artifacts + memory + issue capture",
|
||||
"summary": "Store memory event A for daily :: Required startup + artifacts + memory + issue capture Store memory event B for daily :: Required startup + artifacts + memory + issue capture",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"store"
|
||||
],
|
||||
"importance": 0.55,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771296574057,
|
||||
"last_seen": 1771296574172,
|
||||
"source": "scheduler-store",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"2612b9ce-1aa7-4731-acb2-c3a852eeaac6",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "2612b9ce-1aa7-4731-acb2-c3a852eeaac6",
|
||||
"agent_id": "onboarding-audit-agent",
|
||||
"session_id": "initial-seed",
|
||||
"type": "batch_window",
|
||||
"content": "Memory retrieval seed for daily :: Required startup + artifacts + memory + issue capture",
|
||||
"summary": "Memory retrieval seed for daily :: Required startup + artifacts + memory + issue capture",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"retrieve"
|
||||
],
|
||||
"importance": 0.4,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771296574158,
|
||||
"last_seen": 1771296574172,
|
||||
"source": "scheduler-retrieve",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"facf005a-dad0-4066-921c-49a8e408665c",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "facf005a-dad0-4066-921c-49a8e408665c",
|
||||
"agent_id": "agent-telemetry",
|
||||
"session_id": "s-telemetry",
|
||||
"type": "batch_window",
|
||||
"content": "customer token ABC123 secret",
|
||||
"summary": "customer token ABC123 secret",
|
||||
"tags": [
|
||||
"incident"
|
||||
],
|
||||
"importance": 0.25,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771296636016,
|
||||
"last_seen": 1771301051605,
|
||||
"source": "ingest",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"19ef312e-a725-4544-850e-651713e2d9dc",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "19ef312e-a725-4544-850e-651713e2d9dc",
|
||||
"agent_id": "bug-reproducer-agent",
|
||||
"session_id": "session-mlq2vq5p",
|
||||
"type": "batch_window",
|
||||
"content": "Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture",
|
||||
"summary": "Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"weekly",
|
||||
"retrieve"
|
||||
],
|
||||
"importance": 0.4,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771300999213,
|
||||
"last_seen": 1771300999222,
|
||||
"source": "scheduler-retrieve",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"bfbb3c6e-095d-4ccd-ad5a-140b6927421c",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "bfbb3c6e-095d-4ccd-ad5a-140b6927421c",
|
||||
"agent_id": "agent-telemetry",
|
||||
"session_id": "s-telemetry",
|
||||
"type": "batch_window",
|
||||
"content": "customer token ABC123 secret",
|
||||
"summary": "customer token ABC123 secret",
|
||||
"tags": [
|
||||
"incident"
|
||||
],
|
||||
"importance": 0.25,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771301051598,
|
||||
"last_seen": 1771301051605,
|
||||
"source": "ingest",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"d74e3e34-6cf1-465e-b4a8-64acd0a8d803",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "d74e3e34-6cf1-465e-b4a8-64acd0a8d803",
|
||||
"agent_id": "bug-reproducer-agent",
|
||||
"session_id": "session-mlq2ysd2",
|
||||
"type": "batch_window",
|
||||
"content": "Reproduced npm test timeout issue. Created reproduction script in artifacts/reproducers/npm-test-timeout/. Confirmed that `npm test` hangs/times out as expected.",
|
||||
"summary": "Reproduced npm test timeout issue. Created reproduction script in artifacts/reproducers/npm-test-timeout/. Confirmed that `npm test` hangs/times out as expected.",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"weekly",
|
||||
"store",
|
||||
"insight"
|
||||
],
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771301142040,
|
||||
"last_seen": 1771301142040,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"3df7bccf-f3f1-45b9-ab15-88a1a30c6453",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "3df7bccf-f3f1-45b9-ab15-88a1a30c6453",
|
||||
"agent_id": "changelog-agent",
|
||||
"session_id": "session-mlq51t0r",
|
||||
"type": "batch_window",
|
||||
"content": "Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture",
|
||||
"summary": "Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"weekly",
|
||||
"retrieve"
|
||||
],
|
||||
"importance": 0.4,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771304642091,
|
||||
"last_seen": 1771304642101,
|
||||
"source": "scheduler-retrieve",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"5b32be34-78f9-44ac-b7b1-e301e34f04d0",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "5b32be34-78f9-44ac-b7b1-e301e34f04d0",
|
||||
"agent_id": "changelog-agent",
|
||||
"session_id": "session-mlq53the",
|
||||
"type": "batch_window",
|
||||
"content": "# Changelog Update - 2026-02-17\n\nGenerated draft release notes covering 212 commits.\nKey areas:\n- Scheduler automation improvements\n- Memory management features\n- Codebase modularization",
|
||||
"summary": "# Changelog Update - 2026-02-17\n\nGenerated draft release notes covering 212 commits.\nKey areas:\n- Scheduler automation improvements\n- Memory management features\n- Codebase modularization",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"weekly",
|
||||
"store",
|
||||
"insight"
|
||||
],
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1771304736005,
|
||||
"last_seen": 1771304736005,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cadence": "weekly",
|
||||
"operation": "retrieve",
|
||||
"runId": "session-mlq2vq5p",
|
||||
"servicePath": "src/services/memory/index.js#getRelevantMemories",
|
||||
"inputs": {
|
||||
"agentId": "bug-reproducer-agent",
|
||||
"promptPath": "src/prompts/weekly/bug-reproducer-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"query": "scheduler | weekly | agent | bug-reproducer-agent | intent | Required startup + artifacts + memory + issue capture",
|
||||
"events": 1
|
||||
},
|
||||
"outputs": {
|
||||
"ingestedCount": 1,
|
||||
"retrievedCount": 1
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"cadence": "weekly",
|
||||
"operation": "store",
|
||||
"runId": "session-mlq2ysd2",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "bug-reproducer-agent",
|
||||
"promptPath": "src/prompts/weekly/bug-reproducer-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"events": 1,
|
||||
"sourceFile": "memory-update.md"
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"Reproduced npm test timeout issue. Created reproduction script in artifacts/reproducers/npm-test-timeout/. Confirmed that `npm test` hangs/times out as expected."
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cadence": "weekly",
|
||||
"operation": "retrieve",
|
||||
"runId": "session-mlq51t0r",
|
||||
"servicePath": "src/services/memory/index.js#getRelevantMemories",
|
||||
"inputs": {
|
||||
"agentId": "changelog-agent",
|
||||
"promptPath": "src/prompts/weekly/changelog-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"query": "scheduler | weekly | agent | changelog-agent | intent | Required startup + artifacts + memory + issue capture",
|
||||
"events": 1
|
||||
},
|
||||
"outputs": {
|
||||
"ingestedCount": 1,
|
||||
"retrievedCount": 1
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"cadence": "weekly",
|
||||
"operation": "store",
|
||||
"runId": "session-mlq53the",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "changelog-agent",
|
||||
"promptPath": "src/prompts/weekly/changelog-agent.md",
|
||||
"promptIntent": "Required startup + artifacts + memory + issue capture",
|
||||
"events": 1,
|
||||
"sourceFile": "memory-update.md"
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"# Changelog Update - 2026-02-17\n\nGenerated draft release notes covering 212 commits.\nKey areas:\n- Scheduler automation improvements\n- Memory management features\n- Codebase modularization"
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "retrieve",
|
||||
"runId": "test-run-2",
|
||||
"servicePath": "src/services/memory/index.js#getRelevantMemories",
|
||||
"inputs": {
|
||||
"agentId": "test-agent",
|
||||
"promptPath": "",
|
||||
"promptIntent": "scheduler memory retrieval",
|
||||
"query": "scheduler | daily | agent | test-agent | intent | scheduler memory retrieval",
|
||||
"events": 1
|
||||
},
|
||||
"outputs": {
|
||||
"ingestedCount": 1,
|
||||
"retrievedCount": 2
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "store",
|
||||
"runId": "test-run",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "test-agent",
|
||||
"promptPath": "",
|
||||
"promptIntent": "scheduler memory store",
|
||||
"events": 2
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"Store memory event A for daily :: scheduler memory store Store memory event B for daily :: scheduler memory store"
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -1,112 +0,0 @@
|
||||
# AGENTS.md — Repository-Agnostic Agent Operating Guide
|
||||
|
||||
This file defines how agents should work in this repository **before any project-specific customization exists**.
|
||||
|
||||
## Purpose
|
||||
|
||||
- Keep agent work predictable, auditable, and safe.
|
||||
- Minimize repeated discovery work across sessions.
|
||||
- Capture durable learnings so future agents can move faster.
|
||||
|
||||
## Session startup checklist (run every session)
|
||||
|
||||
1. Read `AGENTS.md`.
|
||||
2. Read `CLAUDE.md` for execution workflow details.
|
||||
3. Read `CONTRIBUTING.md` for commit and PR expectations.
|
||||
4. Read `KNOWN_ISSUES.md` for active blockers and workarounds.
|
||||
5. Read `docs/agent-handoffs/README.md`.
|
||||
6. Scan recent notes in:
|
||||
- `docs/agent-handoffs/learnings/`
|
||||
- `docs/agent-handoffs/incidents/`
|
||||
7. If present, review the current run artifacts in:
|
||||
- `src/context/`
|
||||
- `src/todo/`
|
||||
- `src/decisions/`
|
||||
- `src/test_logs/`
|
||||
- `src/issues/`
|
||||
|
||||
## Core operating principles
|
||||
|
||||
- Default to generic guidance and neutral language.
|
||||
- Make the smallest safe change that satisfies the request.
|
||||
- Avoid unrelated refactors.
|
||||
- Preserve backward compatibility unless explicitly asked otherwise.
|
||||
- Prefer explicit commands and documented behavior over assumptions.
|
||||
- Record assumptions clearly in your final summary.
|
||||
|
||||
## Validation policy
|
||||
|
||||
- Run the most relevant checks for changed files (tests, lint, typecheck, build, or targeted scripts).
|
||||
- Never claim a check passed unless it was actually executed.
|
||||
- If a check cannot run, record:
|
||||
- command attempted,
|
||||
- why it could not complete,
|
||||
- what fallback validation was performed.
|
||||
|
||||
## Knowledge-sharing protocol
|
||||
|
||||
### What belongs where
|
||||
|
||||
- `KNOWN_ISSUES.md`
|
||||
- Active, reproducible issues only.
|
||||
- Include status, impact, workaround, and last verification date.
|
||||
- `docs/agent-handoffs/learnings/`
|
||||
- Proven patterns, repeatable fixes, and successful implementation guidance.
|
||||
- `docs/agent-handoffs/incidents/`
|
||||
- Failures, root causes, mitigations, and prevention guidance.
|
||||
- `src/context/`
|
||||
- Snapshot of current task context (goal, scope, constraints).
|
||||
- `src/todo/`
|
||||
- Actionable checklist for in-progress work.
|
||||
- `src/decisions/`
|
||||
- Key implementation decisions and rationale.
|
||||
- `src/test_logs/`
|
||||
- Commands run and their outcomes.
|
||||
- `src/issues/`
|
||||
- One-off investigative or audit outputs not yet promoted to `KNOWN_ISSUES.md`.
|
||||
|
||||
### Naming standard (generic)
|
||||
|
||||
Use: `YYYY-MM-DD-short-topic.md`
|
||||
|
||||
Examples:
|
||||
|
||||
- `2026-02-14-validation-before-summary.md`
|
||||
- `2026-02-14-missing-baseline-context.md`
|
||||
|
||||
Naming rules:
|
||||
|
||||
- Keep names concise and descriptive.
|
||||
- Avoid company, product, team, customer, and environment names.
|
||||
- Prefer neutral technical terms.
|
||||
|
||||
### Required sections for reusable notes
|
||||
|
||||
Use these headings in learning/incident notes:
|
||||
|
||||
1. Context
|
||||
2. Observation
|
||||
3. Action taken
|
||||
4. Validation performed
|
||||
5. Recommendation for next agents
|
||||
|
||||
### Update decision tree
|
||||
|
||||
When you discover reusable context:
|
||||
|
||||
1. Check if an existing note already covers it.
|
||||
2. If yes, update that note.
|
||||
3. If no, add a new note in `learnings/` or `incidents/`.
|
||||
4. If the issue is still active/reproducible, add or update `KNOWN_ISSUES.md`.
|
||||
|
||||
## Priority order when guidance conflicts
|
||||
|
||||
1. System/developer/user instructions in the active session
|
||||
2. `AGENTS.md`
|
||||
3. `CLAUDE.md`
|
||||
4. `CONTRIBUTING.md`
|
||||
5. Inline code comments and prompt templates
|
||||
|
||||
## Keep this file generic
|
||||
|
||||
Only add project-specific details after they are truly needed and explicitly labeled as repository-specific.
|
||||
@@ -1,108 +0,0 @@
|
||||
# CLAUDE.md — Generic Agent Execution Workflow
|
||||
|
||||
This guide defines an execution flow that works across repositories and tech stacks.
|
||||
|
||||
## Default workflow
|
||||
|
||||
1. **Load baseline context**
|
||||
- `AGENTS.md`
|
||||
- `CONTRIBUTING.md`
|
||||
- `KNOWN_ISSUES.md`
|
||||
- `docs/agent-handoffs/README.md`
|
||||
- Recent notes in `docs/agent-handoffs/learnings/` and `docs/agent-handoffs/incidents/`
|
||||
2. **Clarify the task**
|
||||
- Restate the requested outcome.
|
||||
- Identify constraints, risks, and assumptions.
|
||||
3. **Plan minimal changes**
|
||||
- Keep scope tight.
|
||||
- Avoid touching unrelated files.
|
||||
4. **Implement**
|
||||
- Apply small, reversible edits.
|
||||
- Favor readability and maintainability.
|
||||
5. **Validate**
|
||||
- Run relevant checks for impacted files.
|
||||
- Capture exact commands and outcomes.
|
||||
6. **Document and hand off**
|
||||
- Summarize what changed and why.
|
||||
- Record reusable learnings/incidents when appropriate.
|
||||
|
||||
## Working files for session state
|
||||
|
||||
Use the following folders as lightweight coordination artifacts:
|
||||
|
||||
- `src/context/` — Current objective, scope, constraints.
|
||||
- `src/todo/` — Task checklist and blockers.
|
||||
- `src/decisions/` — Important design/implementation choices.
|
||||
- `src/test_logs/` — Validation commands and results.
|
||||
- `src/issues/` — Investigations or audits that may become tracked issues.
|
||||
|
||||
### Recommended content templates
|
||||
|
||||
#### Context note template
|
||||
|
||||
- Goal
|
||||
- Scope
|
||||
- Constraints
|
||||
- Open questions
|
||||
|
||||
#### Todo note template
|
||||
|
||||
- Pending tasks
|
||||
- Completed tasks
|
||||
- Blocked tasks
|
||||
|
||||
#### Decision note template
|
||||
|
||||
- Decision
|
||||
- Alternatives considered
|
||||
- Rationale
|
||||
- Consequences/follow-ups
|
||||
|
||||
#### Test log template
|
||||
|
||||
- Command
|
||||
- Result (pass/fail/warn)
|
||||
- Notes (environmental limits, retries, artifacts)
|
||||
|
||||
## Knowledge-sharing protocol
|
||||
|
||||
### Where to write durable knowledge
|
||||
|
||||
- `docs/agent-handoffs/learnings/` for reusable successes.
|
||||
- `docs/agent-handoffs/incidents/` for failures and mitigations.
|
||||
- `KNOWN_ISSUES.md` for active, reproducible unresolved issues.
|
||||
|
||||
### File naming
|
||||
|
||||
Use `YYYY-MM-DD-short-topic.md`.
|
||||
|
||||
### Required structure for learning/incident notes
|
||||
|
||||
1. Context
|
||||
2. Observation
|
||||
3. Action taken
|
||||
4. Validation performed
|
||||
5. Recommendation for next agents
|
||||
|
||||
## Quality checklist before completion
|
||||
|
||||
- Scope matches request.
|
||||
- Documentation remains repository-agnostic unless explicitly needed.
|
||||
- No unsupported claims about testing.
|
||||
- Assumptions and limitations are called out.
|
||||
- Changes are easy to revert.
|
||||
|
||||
## Anti-patterns to avoid
|
||||
|
||||
- Embedding product/company-specific guidance in baseline docs.
|
||||
- Large refactors when a focused change is sufficient.
|
||||
- Skipping validation without recording why.
|
||||
- Creating duplicate notes when an update would suffice.
|
||||
|
||||
## Customization policy
|
||||
|
||||
This file should stay generic until real repository-specific patterns emerge. When customizing:
|
||||
|
||||
- Add a clearly labeled section: `Repository-specific overrides`.
|
||||
- Keep generic workflow unchanged.
|
||||
- Include evidence (commands, failures, repeated incidents) for each override.
|
||||
@@ -45,6 +45,16 @@ Track only **active, reproducible, unresolved** issues.
|
||||
- **Impact:** CI/local testing blocked.
|
||||
- **Last verified:** 2026-02-14
|
||||
|
||||
### `npm test` hangs/times out in full suite run
|
||||
- **Status:** Active
|
||||
- **Area:** Test
|
||||
- **Symptom:** `npm test` times out after 400s when running all tests together.
|
||||
- **Trigger/Conditions:** Running `npm test` in CI/Sandbox.
|
||||
- **Workaround:** Run individual test files or subsets (`npm run validate:scheduler`, `npm run test:integration:e2e`, then specific unit tests).
|
||||
- **Impact:** Cannot verify all tests in a single pass.
|
||||
- **Related notes:** `docs/agent-handoffs/incidents/2026-02-16-npm-test-timeout.md`
|
||||
- **Last verified:** 2026-02-16
|
||||
|
||||
### Recurring scheduler lock backend failures in recent task logs
|
||||
- **Status:** Monitoring
|
||||
- **Area:** Runtime
|
||||
|
||||
+22
-6
@@ -6,20 +6,36 @@ This file tracks external protocol specifications and libraries used in this rep
|
||||
|
||||
| Protocol / Spec | Implementation Points | Compliance Status | Notes |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **NIP-01** (Basic Protocol) | `src/lib.mjs`, `src/lock-ops.mjs` | Compliant | Uses `nostr-tools` for event creation, signing, and relay communication. |
|
||||
| **NIP-01** (Basic Protocol) | `src/lib.mjs`, `src/lock-ops.mjs`, `src/relay-health.mjs` | Compliant | Uses `nostr-tools` for event creation, signing, and relay communication. |
|
||||
| **NIP-04** (Encrypted Direct Message) | N/A | Unknown | Not explicitly used in lock logic, but mentioned in test prompts. |
|
||||
| **NIP-33** (Parameterized Replaceable Events) | `src/lock-ops.mjs` | Compliant | Defines the mechanics for Kind 30078 updates (d-tags). |
|
||||
| **NIP-40** (Expiration Timestamp) | `src/lock-ops.mjs` | Compliant | Parses `expiration` tag to filter active locks. |
|
||||
| **NIP-42** (Authentication) | N/A | Unknown | Not currently implemented in lock logic. |
|
||||
| **NIP-33** (Parameterized Replaceable Events) | `src/lock-ops.mjs` | Compliant | Used for lock events (Kind 30078 is used, which is Application Specific Data, functionally similar to replaceable events). |
|
||||
| **NIP-78** (Application-specific Data) | `src/lock-ops.mjs` | Compliant | Uses Kind 30078 for distributed lock state. |
|
||||
|
||||
## Other Protocols
|
||||
|
||||
| Protocol | Implementation Points | Compliance Status | Notes |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **HTTP/1.1** | `src/dashboard.mjs`, `dashboard/` | Compliant | Dashboard server uses Node.js `http` module. |
|
||||
| **WebSocket** | `src/relay-health.mjs` | Compliant | Raw `ws` usage for health probes; `nostr-tools` for standard relay comms. |
|
||||
| **JSON** | `src/lock-ops.mjs`, `src/ops.mjs` | Compliant | Ubiquitous for event content and config files. |
|
||||
|
||||
## Internal / Custom Protocols
|
||||
|
||||
| Name | Kind / ID | Implementation | Notes |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **Relay Health Probe** | Kind `27235` | `src/relay-health.mjs` | Custom ephemeral event kind used for deep reachability checks. |
|
||||
|
||||
## Libraries
|
||||
|
||||
| Library | Version | Usage | Risks |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `nostr-tools` | `2.19.4` | Core Nostr primitives (keys, events, pool). | Supply chain risk. pinned version recommended. |
|
||||
| `ws` | `8.19.0` | WebSocket client for Node.js. | standard library for Node.js websocket support. |
|
||||
| `nostr-tools` | `2.19.4` | Core Nostr primitives (keys, events, pool). | Supply chain risk. Pinned version recommended. |
|
||||
| `ws` | `8.19.0` | WebSocket client for Node.js. | Standard library for Node.js websocket support. |
|
||||
|
||||
## Implementation details
|
||||
|
||||
- **Locking Mechanism**: Uses Kind 30078 (Application Specific Data) for lock events.
|
||||
- **Locking Mechanism**: Uses Kind 30078 (NIP-78) with NIP-33 semantics (d-tags) and NIP-40 expiration.
|
||||
- **Relay Communication**: Uses `SimplePool` from `nostr-tools` for querying and publishing.
|
||||
- **Health Checks**: Uses raw `WebSocket` connections in `src/relay-health.mjs` for deep health probes.
|
||||
- **Health Checks**: Uses raw `WebSocket` connections in `src/relay-health.mjs` for deep health probes (Kind 27235).
|
||||
@@ -1,6 +1,135 @@
|
||||
# TORCH: Task Orchestration via Relay-Coordinated Handoff
|
||||
|
||||
TORCH is a decentralized task-locking protocol for multi-agent software development.
|
||||
TORCH is a decentralized task-locking protocol for multi-agent software development. This document serves as the primary manual for both human operators and AI agents working within a TORCH-enabled repository.
|
||||
|
||||
---
|
||||
|
||||
## Agent Operating Guide
|
||||
|
||||
This section defines how agents should work in this repository.
|
||||
|
||||
### Purpose
|
||||
|
||||
- Keep agent work predictable, auditable, and safe.
|
||||
- Minimize repeated discovery work across sessions.
|
||||
- Capture durable learnings so future agents can move faster.
|
||||
|
||||
### Session startup checklist (run every session)
|
||||
|
||||
1. **Read `TORCH.md`** (this file).
|
||||
2. Read `CONTRIBUTING.md` for commit and PR expectations.
|
||||
3. Read `KNOWN_ISSUES.md` for active blockers and workarounds.
|
||||
4. Read `docs/agent-handoffs/README.md`.
|
||||
5. Scan recent notes in:
|
||||
- `docs/agent-handoffs/learnings/`
|
||||
- `docs/agent-handoffs/incidents/`
|
||||
6. If present, review the current run artifacts in:
|
||||
- `src/context/`
|
||||
- `src/todo/`
|
||||
- `src/decisions/`
|
||||
- `src/test_logs/`
|
||||
- `src/issues/`
|
||||
|
||||
### Core operating principles
|
||||
|
||||
- Default to generic guidance and neutral language.
|
||||
- Make the smallest safe change that satisfies the request.
|
||||
- Avoid unrelated refactors.
|
||||
- Preserve backward compatibility unless explicitly asked otherwise.
|
||||
- Prefer explicit commands and documented behavior over assumptions.
|
||||
- Record assumptions clearly in your final summary.
|
||||
|
||||
### Validation policy
|
||||
|
||||
- Run the most relevant checks for changed files (tests, lint, typecheck, build, or targeted scripts).
|
||||
- Never claim a check passed unless it was actually executed.
|
||||
- If a check cannot run, record:
|
||||
- command attempted,
|
||||
- why it could not complete,
|
||||
- what fallback validation was performed.
|
||||
|
||||
### Execution Workflow
|
||||
|
||||
1. **Load baseline context** (see Session startup checklist above).
|
||||
2. **Clarify the task**
|
||||
- Restate the requested outcome.
|
||||
- Identify constraints, risks, and assumptions.
|
||||
3. **Plan minimal changes**
|
||||
- Keep scope tight.
|
||||
- Avoid touching unrelated files.
|
||||
4. **Implement**
|
||||
- Apply small, reversible edits.
|
||||
- Favor readability and maintainability.
|
||||
5. **Validate**
|
||||
- Run relevant checks for impacted files.
|
||||
- Capture exact commands and outcomes.
|
||||
6. **Document and hand off**
|
||||
- Summarize what changed and why.
|
||||
- Record reusable learnings/incidents when appropriate.
|
||||
|
||||
### Working files for session state
|
||||
|
||||
Use the following folders as lightweight coordination artifacts:
|
||||
|
||||
- `src/context/` — Current objective, scope, constraints.
|
||||
- `src/todo/` — Task checklist and blockers.
|
||||
- `src/decisions/` — Important design/implementation choices.
|
||||
- `src/test_logs/` — Validation commands and results.
|
||||
- `src/issues/` — Investigations or audits that may become tracked issues.
|
||||
|
||||
#### Content templates
|
||||
|
||||
**Context note:** Goal, Scope, Constraints, Open questions.
|
||||
**Todo note:** Pending tasks, Completed tasks, Blocked tasks.
|
||||
**Decision note:** Decision, Alternatives considered, Rationale, Consequences/follow-ups.
|
||||
**Test log:** Command, Result (pass/fail/warn), Notes (environmental limits, retries, artifacts).
|
||||
|
||||
### Knowledge-sharing protocol
|
||||
|
||||
#### What belongs where
|
||||
|
||||
- `KNOWN_ISSUES.md`: Active, reproducible issues only. Include status, impact, workaround, and last verification date.
|
||||
- `docs/agent-handoffs/learnings/`: Proven patterns, repeatable fixes, and successful implementation guidance.
|
||||
- `docs/agent-handoffs/incidents/`: Failures, root causes, mitigations, and prevention guidance.
|
||||
- `src/context/`, `src/todo/`, etc.: Ephemeral session state.
|
||||
|
||||
#### Naming standard
|
||||
|
||||
Use: `YYYY-MM-DD-short-topic.md` (e.g., `2026-02-14-validation-before-summary.md`).
|
||||
Keep names concise, descriptive, and neutral.
|
||||
|
||||
#### Required sections for reusable notes
|
||||
|
||||
1. Context
|
||||
2. Observation
|
||||
3. Action taken
|
||||
4. Validation performed
|
||||
5. Recommendation for next agents
|
||||
|
||||
#### Update decision tree
|
||||
|
||||
When you discover reusable context:
|
||||
1. Check if an existing note already covers it.
|
||||
2. If yes, update that note.
|
||||
3. If no, add a new note in `learnings/` or `incidents/`.
|
||||
4. If the issue is still active/reproducible, add or update `KNOWN_ISSUES.md`.
|
||||
|
||||
### Quality checklist before completion
|
||||
|
||||
- Scope matches request.
|
||||
- Documentation remains repository-agnostic unless explicitly needed.
|
||||
- No unsupported claims about testing.
|
||||
- Assumptions and limitations are called out.
|
||||
- Changes are easy to revert.
|
||||
|
||||
### Anti-patterns to avoid
|
||||
|
||||
- Embedding product/company-specific guidance in baseline docs.
|
||||
- Large refactors when a focused change is sufficient.
|
||||
- Skipping validation without recording why.
|
||||
- Creating duplicate notes when an update would suffice.
|
||||
|
||||
---
|
||||
|
||||
## Dashboard & Protocol Overview
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# Onboarding Audit Report
|
||||
|
||||
**Date:** 2026-02-16
|
||||
**Agent:** onboarding-audit-agent
|
||||
|
||||
## Headline
|
||||
⚠️ Onboarding failures found
|
||||
|
||||
## Environment
|
||||
- **Platform:** Jules Sandbox (Linux)
|
||||
- **Node Version:** v22.22.0
|
||||
- **npm Version:** 11.10.0
|
||||
|
||||
## Steps Executed
|
||||
1. `npm ci`
|
||||
2. `npm run build`
|
||||
3. `npm test`
|
||||
4. `npm run lint`
|
||||
|
||||
## Results
|
||||
|
||||
| Command | Result | Exit Code | Notes |
|
||||
|---------|--------|-----------|-------|
|
||||
| `npm ci` | Pass | 0 | Installed dependencies cleanly. |
|
||||
| `npm run build` | Pass | 0 | Build output to `dist/`. |
|
||||
| `npm test` | **Fail** | Timeout | Command timed out after 400s. |
|
||||
| `npm run lint` | Pass | 0 | 12 warnings found (no errors). |
|
||||
|
||||
## Failures
|
||||
|
||||
### `npm test` Timeout
|
||||
The command `npm test` (which runs `npm run validate:scheduler && npm run test:integration:e2e && node --test test/*.test.mjs tests/*.test.js`) timed out after 401 seconds.
|
||||
|
||||
**Investigation:**
|
||||
- `npm run validate:scheduler` passed (200ms).
|
||||
- `npm run test:integration:e2e` passed (692ms).
|
||||
- `node --test test/*.test.mjs tests/*.test.js` is the likely cause of the timeout.
|
||||
- Individual runs of `test/lock-ops.test.mjs`, `test/lock-ops-publish-retry.test.mjs`, `test/relay-fanout-quorum.integration.test.mjs`, `test/lock-acquisition-resilience.integration.test.mjs`, and `tests/memory.test.js` all passed quickly.
|
||||
- The timeout suggests either a deadlock or extreme slowness when running the full suite in this environment.
|
||||
|
||||
### Lint Warnings
|
||||
`npm run lint` passed but emitted 12 warnings (mostly `no-unused-vars`). These should be addressed but did not break the build.
|
||||
|
||||
## Recommendations
|
||||
1. **Investigate Test Suite Performance:** The test suite takes too long or hangs in the sandbox environment. Investigate `test/*.test.mjs` for potential deadlocks or resource contention.
|
||||
2. **Address Lint Warnings:** Clean up unused variables to keep the codebase clean.
|
||||
3. **Docs Update:** No documentation changes required as the commands are correct, but the execution reliability needs improvement.
|
||||
|
||||
## Actions Taken
|
||||
- Verified individual test files passed.
|
||||
- Recorded full timeout failure.
|
||||
@@ -0,0 +1,15 @@
|
||||
# npm test timeout reproduction
|
||||
|
||||
## Issue
|
||||
`npm test` hangs/times out in full suite run. It takes over 400s and times out in sandbox environment.
|
||||
|
||||
## Reproduction
|
||||
This directory contains a script `repro.sh` that attempts to run `npm test` and times out after 30s to demonstrate the issue without waiting the full duration.
|
||||
|
||||
## Run
|
||||
```bash
|
||||
bash artifacts/reproducers/npm-test-timeout/repro.sh
|
||||
```
|
||||
|
||||
## Logs
|
||||
Output is captured in `npm_test_output.log`.
|
||||
@@ -0,0 +1,805 @@
|
||||
|
||||
> [email protected] test
|
||||
> npm run validate:scheduler && npm run test:integration:e2e && node --test test/*.test.mjs tests/*.test.js
|
||||
|
||||
|
||||
> [email protected] validate:scheduler
|
||||
> node scripts/validate-scheduler-roster.mjs && node scripts/validate-prompt-contract.mjs && node scripts/validate-scheduler-flow-parity.mjs && npm run validate:scheduler-failure-schema
|
||||
|
||||
Scheduler tables, roster, and prompt filenames are in sync.
|
||||
Prompt contract validated for all daily/weekly prompts.
|
||||
Scheduler flow parity validated for prompts and scheduler implementation.
|
||||
|
||||
> [email protected] validate:scheduler-failure-schema
|
||||
> node --test test/scheduler-lock-failure-schema.contract.test.mjs
|
||||
|
||||
TAP version 13
|
||||
# Subtest: scheduler lock backend failure artifact matches required frontmatter schema
|
||||
ok 1 - scheduler lock backend failure artifact matches required frontmatter schema
|
||||
---
|
||||
duration_ms: 161.154264
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: schema contract catches missing required lock-backend field
|
||||
ok 2 - schema contract catches missing required lock-backend field
|
||||
---
|
||||
duration_ms: 2.871179
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: schema contract catches misnamed lock-backend key
|
||||
ok 3 - schema contract catches misnamed lock-backend key
|
||||
---
|
||||
duration_ms: 0.834819
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 318.644346
|
||||
|
||||
> [email protected] test:integration:e2e
|
||||
> node --test test/scheduler-preflight-lock.e2e.test.mjs
|
||||
|
||||
TAP version 13
|
||||
# Subtest: lock preflight e2e: successful lock writes completed status snapshot
|
||||
ok 1 - lock preflight e2e: successful lock writes completed status snapshot
|
||||
---
|
||||
duration_ms: 452.810254
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker
|
||||
ok 2 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker
|
||||
---
|
||||
duration_ms: 102.636238
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification
|
||||
ok 3 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification
|
||||
---
|
||||
duration_ms: 180.269665
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 824.280539
|
||||
TAP version 13
|
||||
# Subtest: Build artifacts verification
|
||||
# Subtest: dist directory exists
|
||||
not ok 1 - dist directory exists
|
||||
---
|
||||
duration_ms: 1.943115
|
||||
type: 'test'
|
||||
location: '/app/test/build_verification.test.mjs:9:11'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
dist directory should exist
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/test/build_verification.test.mjs:10:12)
|
||||
Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
Test.run (node:internal/test_runner/test:1047:25)
|
||||
Test.start (node:internal/test_runner/test:944:17)
|
||||
TestContext.test (node:internal/test_runner/test:373:20)
|
||||
TestContext.<anonymous> (file:///app/test/build_verification.test.mjs:9:11)
|
||||
Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
Test.run (node:internal/test_runner/test:1047:25)
|
||||
Test.start (node:internal/test_runner/test:944:17)
|
||||
startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
...
|
||||
# Subtest: Critical files exist in dist
|
||||
not ok 2 - Critical files exist in dist
|
||||
---
|
||||
duration_ms: 0.501843
|
||||
type: 'test'
|
||||
location: '/app/test/build_verification.test.mjs:13:11'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
File index.html should exist in dist
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
file:///app/test/build_verification.test.mjs:25:14
|
||||
Array.forEach (<anonymous>)
|
||||
TestContext.<anonymous> (file:///app/test/build_verification.test.mjs:23:19)
|
||||
Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
Test.run (node:internal/test_runner/test:1047:25)
|
||||
Test.start (node:internal/test_runner/test:944:17)
|
||||
TestContext.test (node:internal/test_runner/test:373:20)
|
||||
TestContext.<anonymous> (file:///app/test/build_verification.test.mjs:13:11)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3)
|
||||
...
|
||||
# Subtest: TORCH.md content is not empty
|
||||
not ok 3 - TORCH.md content is not empty
|
||||
---
|
||||
duration_ms: 0.240573
|
||||
type: 'test'
|
||||
location: '/app/test/build_verification.test.mjs:29:11'
|
||||
failureType: 'testCodeFailure'
|
||||
error: "ENOENT: no such file or directory, open '/app/dist/src/docs/TORCH.md'"
|
||||
code: 'ENOENT'
|
||||
stack: |-
|
||||
Object.readFileSync (node:fs:440:20)
|
||||
TestContext.<anonymous> (file:///app/test/build_verification.test.mjs:31:24)
|
||||
Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
Test.run (node:internal/test_runner/test:1047:25)
|
||||
Test.start (node:internal/test_runner/test:944:17)
|
||||
TestContext.test (node:internal/test_runner/test:373:20)
|
||||
TestContext.<anonymous> (file:///app/test/build_verification.test.mjs:29:11)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3)
|
||||
...
|
||||
1..3
|
||||
not ok 1 - Build artifacts verification
|
||||
---
|
||||
duration_ms: 4.188468
|
||||
type: 'test'
|
||||
location: '/app/test/build_verification.test.mjs:8:1'
|
||||
failureType: 'subtestsFailed'
|
||||
error: '3 subtests failed'
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: parseArgs should parse basic command
|
||||
ok 2 - parseArgs should parse basic command
|
||||
---
|
||||
duration_ms: 1.628077
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse agent and cadence
|
||||
ok 3 - parseArgs should parse agent and cadence
|
||||
---
|
||||
duration_ms: 0.273442
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse equals sign syntax
|
||||
ok 4 - parseArgs should parse equals sign syntax
|
||||
---
|
||||
duration_ms: 3.043129
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse dry-run flag
|
||||
ok 5 - parseArgs should parse dry-run flag
|
||||
---
|
||||
duration_ms: 0.396494
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse port with default
|
||||
ok 6 - parseArgs should parse port with default
|
||||
---
|
||||
duration_ms: 0.220731
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse custom port
|
||||
ok 7 - parseArgs should parse custom port
|
||||
---
|
||||
duration_ms: 0.175744
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse ignore-logs flag
|
||||
ok 8 - parseArgs should parse ignore-logs flag
|
||||
---
|
||||
duration_ms: 0.527959
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse memory flags
|
||||
ok 9 - parseArgs should parse memory flags
|
||||
---
|
||||
duration_ms: 1.240767
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: parseArgs should parse memory flags with equals
|
||||
ok 10 - parseArgs should parse memory flags with equals
|
||||
---
|
||||
duration_ms: 0.722583
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: src/lib.mjs
|
||||
# Subtest: cmdCheck
|
||||
# Subtest: returns correct structure with empty locks
|
||||
ok 1 - returns correct structure with empty locks
|
||||
---
|
||||
duration_ms: 2.660305
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: identifies locked agents
|
||||
ok 2 - identifies locked agents
|
||||
---
|
||||
duration_ms: 0.566843
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: excludes paused agents
|
||||
ok 3 - excludes paused agents
|
||||
---
|
||||
duration_ms: 0.667234
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: identifies unknown locked agents
|
||||
ok 4 - identifies unknown locked agents
|
||||
---
|
||||
duration_ms: 0.719212
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
ok 1 - cmdCheck
|
||||
---
|
||||
duration_ms: 5.847049
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: cmdLock
|
||||
# Subtest: successfully locks an available agent
|
||||
ok 1 - successfully locks an available agent
|
||||
---
|
||||
duration_ms: 11.539654
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails if agent is not in roster
|
||||
ok 2 - fails if agent is not in roster
|
||||
---
|
||||
duration_ms: 1.014006
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails if agent is already locked
|
||||
ok 3 - fails if agent is already locked
|
||||
---
|
||||
duration_ms: 0.439892
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails if agent is already completed
|
||||
ok 4 - fails if agent is already completed
|
||||
---
|
||||
duration_ms: 0.594932
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails if race check is lost
|
||||
ok 5 - fails if race check is lost
|
||||
---
|
||||
duration_ms: 2.839858
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handles race condition with identical timestamps using eventId tie-breaker (we win)
|
||||
ok 6 - handles race condition with identical timestamps using eventId tie-breaker (we win)
|
||||
---
|
||||
duration_ms: 13.94634
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handles race condition with identical timestamps using eventId tie-breaker (we lose)
|
||||
ok 7 - handles race condition with identical timestamps using eventId tie-breaker (we lose)
|
||||
---
|
||||
duration_ms: 1.184325
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: dry run does not publish
|
||||
ok 8 - dry run does not publish
|
||||
---
|
||||
duration_ms: 0.411616
|
||||
type: 'test'
|
||||
...
|
||||
1..8
|
||||
ok 2 - cmdLock
|
||||
---
|
||||
duration_ms: 33.349845
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: cmdList
|
||||
# Subtest: lists active locks
|
||||
ok 1 - lists active locks
|
||||
---
|
||||
duration_ms: 0.770961
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: warns about unknown agents
|
||||
ok 2 - warns about unknown agents
|
||||
---
|
||||
duration_ms: 0.399904
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handles no locks
|
||||
ok 3 - handles no locks
|
||||
---
|
||||
duration_ms: 0.367057
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
ok 3 - cmdList
|
||||
---
|
||||
duration_ms: 1.797004
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: cmdComplete
|
||||
# Subtest: successfully completes an active lock
|
||||
ok 1 - successfully completes an active lock
|
||||
---
|
||||
duration_ms: 1.126175
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails if no active lock found
|
||||
ok 2 - fails if no active lock found
|
||||
---
|
||||
duration_ms: 0.374503
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: detects already completed task
|
||||
ok 3 - detects already completed task
|
||||
---
|
||||
duration_ms: 0.251288
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
ok 4 - cmdComplete
|
||||
---
|
||||
duration_ms: 1.913573
|
||||
type: 'suite'
|
||||
...
|
||||
1..4
|
||||
ok 11 - src/lib.mjs
|
||||
---
|
||||
duration_ms: 43.819865
|
||||
type: 'suite'
|
||||
...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# Published to 1/3 relays (required=1, timeout=25ms)
|
||||
# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)...
|
||||
# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)...
|
||||
# Published to 2/2 relays (required=2, timeout=25ms)
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)...
|
||||
# Published to 2/3 relays (required=2, timeout=25ms)
|
||||
# (node:2900) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time
|
||||
# (Use `node --trace-warnings ...` to show where the warning was created)
|
||||
# Subtest: ci-resilience lock acquisition under unstable relays
|
||||
# Subtest: recovers after all relays are down for an initial outage window
|
||||
ok 1 - recovers after all relays are down for an initial outage window
|
||||
---
|
||||
duration_ms: 23.840291
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: survives intermittent timeout spikes and reaches quorum with bounded retries
|
||||
ok 2 - survives intermittent timeout spikes and reaches quorum with bounded retries
|
||||
---
|
||||
duration_ms: 7.936966
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handles staggered relay recovery and never exceeds retry budget
|
||||
ok 3 - handles staggered relay recovery and never exceeds retry budget
|
||||
---
|
||||
duration_ms: 4.671589
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
ok 12 - ci-resilience lock acquisition under unstable relays
|
||||
---
|
||||
duration_ms: 38.603362
|
||||
type: 'suite'
|
||||
...
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# Published to 1/1 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# Published to 1/1 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://relay-a)...
|
||||
# (node:2906) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time
|
||||
# (Use `node --trace-warnings ...` to show where the warning was created)
|
||||
# Subtest: publishLock retry behavior
|
||||
# Subtest: succeeds immediately on first attempt without retries
|
||||
ok 1 - succeeds immediately on first attempt without retries
|
||||
---
|
||||
duration_ms: 5.474069
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: retries a transient failure then succeeds within retry budget with bounded jitter
|
||||
ok 2 - retries a transient failure then succeeds within retry budget with bounded jitter
|
||||
---
|
||||
duration_ms: 3.032713
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: returns terminal relay_publish_quorum_failure after exhausting retry budget
|
||||
ok 3 - returns terminal relay_publish_quorum_failure after exhausting retry budget
|
||||
---
|
||||
duration_ms: 6.480207
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: short-circuits non-retryable failures without extra attempts
|
||||
ok 4 - short-circuits non-retryable failures without extra attempts
|
||||
---
|
||||
duration_ms: 4.454286
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
ok 13 - publishLock retry behavior
|
||||
---
|
||||
duration_ms: 21.111696
|
||||
type: 'suite'
|
||||
...
|
||||
# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)...
|
||||
# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)...
|
||||
# Published to 2/2 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 1 relays (wss://primary-down)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://primary-down)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://primary-down)...
|
||||
# [publish:primary] Publishing to 1 relays (wss://primary-bad)...
|
||||
# [publish:primary] Publishing to 5 relays (relay-timeout, wss://dns, wss://tcp, wss://tls, wss://ws)...
|
||||
# [publish:primary] Publishing to 2 relays (wss://relay-bad, wss://relay-ok)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1}
|
||||
# Published to 1/2 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 1 relays (wss://primary-bad)...
|
||||
# [publish:fallback] Publishing to 1 relays (wss://fallback-ok)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0}
|
||||
# Published to 1/2 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 2 relays (wss://bad, wss://healthy)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0}
|
||||
# Published to 1/2 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 2 relays (wss://healthy, wss://bad)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0}
|
||||
# Published to 1/2 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 1 relays (wss://healthy)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":0}],"totalElapsedMs":0}
|
||||
# Published to 1/1 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 1 relays (wss://healthy)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":0}],"totalElapsedMs":0}
|
||||
# Published to 1/1 relays (required=1, timeout=200ms)
|
||||
# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)...
|
||||
# [publish:fallback] Publishing to 1 relays (wss://fallback-healthy)...
|
||||
# {"event":"lock_publish_quorum_met","correlationId":"none","attemptId":"1","publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"elapsedMs":0}],"totalElapsedMs":0}
|
||||
# Published to 1/3 relays (required=1, timeout=200ms)
|
||||
# Subtest: lock-ops
|
||||
# Subtest: parseLockEvent
|
||||
# Subtest: parses a valid lock event correctly
|
||||
ok 1 - parses a valid lock event correctly
|
||||
---
|
||||
duration_ms: 1.716055
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
ok 1 - parseLockEvent
|
||||
---
|
||||
duration_ms: 3.018249
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: queryLocks
|
||||
# Subtest: falls back to fallback relays when primary query fails
|
||||
ok 1 - falls back to fallback relays when primary query fails
|
||||
---
|
||||
duration_ms: 16.736135
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
ok 2 - queryLocks
|
||||
---
|
||||
duration_ms: 17.017963
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: publishLock
|
||||
# Subtest: retries transient failures and succeeds on a later attempt
|
||||
ok 1 - retries transient failures and succeeds on a later attempt
|
||||
---
|
||||
duration_ms: 6.464641
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails after retry budget is exhausted for persistent transient failures
|
||||
ok 2 - fails after retry budget is exhausted for persistent transient failures
|
||||
---
|
||||
duration_ms: 2.486588
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: fails without retry for persistent validation failures
|
||||
ok 3 - fails without retry for persistent validation failures
|
||||
---
|
||||
duration_ms: 1.482804
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: includes per-relay reason categories and retry metadata in failure diagnostics
|
||||
ok 4 - includes per-relay reason categories and retry metadata in failure diagnostics
|
||||
---
|
||||
duration_ms: 1.999629
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: returns success when mixed relay outcomes still satisfy quorum
|
||||
ok 5 - returns success when mixed relay outcomes still satisfy quorum
|
||||
---
|
||||
duration_ms: 1.501278
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: uses fallback relays to satisfy min success quorum
|
||||
ok 6 - uses fallback relays to satisfy min success quorum
|
||||
---
|
||||
duration_ms: 1.321733
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: quarantines repeatedly failing relays and still reaches quorum with one healthy relay
|
||||
ok 7 - quarantines repeatedly failing relays and still reaches quorum with one healthy relay
|
||||
---
|
||||
duration_ms: 1.884675
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: uses fallback and min active pool to reintroduce quarantined relay when needed
|
||||
ok 8 - uses fallback and min active pool to reintroduce quarantined relay when needed
|
||||
---
|
||||
duration_ms: 1.10908
|
||||
type: 'test'
|
||||
...
|
||||
1..8
|
||||
ok 3 - publishLock
|
||||
---
|
||||
duration_ms: 19.320605
|
||||
type: 'suite'
|
||||
...
|
||||
1..3
|
||||
ok 14 - lock-ops
|
||||
---
|
||||
duration_ms: 40.427275
|
||||
type: 'suite'
|
||||
...
|
||||
# memory_telemetry {
|
||||
# event: 'memory:ingested',
|
||||
# payload: {
|
||||
# memory_id: 'bfbb3c6e-095d-4ccd-ad5a-140b6927421c',
|
||||
# agent_id: 'agent-telemetry',
|
||||
# dedupe_key: '5054d3273b526ef45167a03a7543de870139af75b9b12cfd920ce80e715e7a88',
|
||||
# chunk_events: 1,
|
||||
# window_start: 0,
|
||||
# window_end: 1771301051599
|
||||
# },
|
||||
# ts: 1771301051603
|
||||
# }
|
||||
# memory_metric {
|
||||
# metric: 'memory_ingested_total',
|
||||
# payload: { count: 1 },
|
||||
# ts: 1771301051604
|
||||
# }
|
||||
# memory_metric {
|
||||
# metric: 'memory_retrieved_total',
|
||||
# payload: { count: 2, cache_hit: false },
|
||||
# ts: 1771301051607
|
||||
# }
|
||||
# memory_telemetry {
|
||||
# event: 'memory:pruned',
|
||||
# payload: { pruned_count: 1, retention_ms: 1000, dry_run: true },
|
||||
# ts: 1771301051608
|
||||
# }
|
||||
# memory_metric {
|
||||
# metric: 'memory_pruned_total',
|
||||
# payload: { count: 0, retention_ms: 1000, dry_run: true },
|
||||
# ts: 1771301051608
|
||||
# }
|
||||
# memory_telemetry {
|
||||
# event: 'memory:prune_skipped',
|
||||
# payload: { reason: 'flag_disabled', retention_ms: 1000 },
|
||||
# ts: 1771301051609
|
||||
# }
|
||||
# Subtest: listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks
|
||||
ok 15 - listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks
|
||||
---
|
||||
duration_ms: 2.688735
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: triggerPruneDryRun returns candidate metadata without deleting records
|
||||
ok 16 - triggerPruneDryRun returns candidate metadata without deleting records
|
||||
---
|
||||
duration_ms: 0.525091
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: memoryStats reports counts/rates and retrieval telemetry remains redaction-safe
|
||||
ok 17 - memoryStats reports counts/rates and retrieval telemetry remains redaction-safe
|
||||
---
|
||||
duration_ms: 9.591187
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: runPruneCycle respects prune feature-flag modes
|
||||
ok 18 - runPruneCycle respects prune feature-flag modes
|
||||
---
|
||||
duration_ms: 1.379088
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: stores runtime events in signer/session namespace and clears scope
|
||||
ok 19 - stores runtime events in signer/session namespace and clears scope
|
||||
---
|
||||
duration_ms: 2.59644
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: expires runtime events and records expiration metrics
|
||||
ok 20 - expires runtime events and records expiration metrics
|
||||
---
|
||||
duration_ms: 10.478883
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: enforces LRU bounds and tracks eviction metrics
|
||||
ok 21 - enforces LRU bounds and tracks eviction metrics
|
||||
---
|
||||
duration_ms: 0.718567
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: blocks decrypted/session-sensitive data from durable promotion without sanitizer pass
|
||||
ok 22 - blocks decrypted/session-sensitive data from durable promotion without sanitizer pass
|
||||
---
|
||||
duration_ms: 0.37624
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: createEmbedderAdapter selects in-memory backend and supports vector CRUD
|
||||
ok 23 - createEmbedderAdapter selects in-memory backend and supports vector CRUD
|
||||
---
|
||||
duration_ms: 1.638314
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: createEmbedderAdapter reads backend from environment
|
||||
ok 24 - createEmbedderAdapter reads backend from environment
|
||||
---
|
||||
duration_ms: 2.709345
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: memory feature flags parse defaults and canary allow-lists
|
||||
ok 25 - memory feature flags parse defaults and canary allow-lists
|
||||
---
|
||||
duration_ms: 1.303503
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: memory prune flag supports off, dry-run, and active modes
|
||||
ok 26 - memory prune flag supports off, dry-run, and active modes
|
||||
---
|
||||
duration_ms: 0.302096
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry
|
||||
ok 27 - ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry
|
||||
---
|
||||
duration_ms: 6.119984
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket
|
||||
ok 28 - ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket
|
||||
---
|
||||
duration_ms: 0.828632
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: createLifecyclePlan respects delete safety constraints and logs reasons
|
||||
ok 29 - createLifecyclePlan respects delete safety constraints and logs reasons
|
||||
---
|
||||
duration_ms: 2.398993
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: createLifecyclePlan condenses near-duplicates and archives merged source records
|
||||
ok 30 - createLifecyclePlan condenses near-duplicates and archives merged source records
|
||||
---
|
||||
duration_ms: 0.943965
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyLifecycleActions executes keep/archive/delete and merge markers
|
||||
ok 31 - applyLifecycleActions executes keep/archive/delete and merge markers
|
||||
---
|
||||
duration_ms: 1.383097
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: filterAndRankMemories applies metadata filters and composite score
|
||||
ok 32 - filterAndRankMemories applies metadata filters and composite score
|
||||
---
|
||||
duration_ms: 2.851358
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming
|
||||
ok 33 - formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming
|
||||
---
|
||||
duration_ms: 2.468796
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isMemoryRetrievalEnabled supports global toggle and agent canary list
|
||||
ok 34 - isMemoryRetrievalEnabled supports global toggle and agent canary list
|
||||
---
|
||||
duration_ms: 0.407381
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderPromptWithMemoryContext injects bounded memory block before base prompt
|
||||
ok 35 - renderPromptWithMemoryContext injects bounded memory block before base prompt
|
||||
---
|
||||
duration_ms: 0.818684
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: createDbAdvisoryLockProvider acquires and releases postgres advisory locks
|
||||
ok 36 - createDbAdvisoryLockProvider acquires and releases postgres advisory locks
|
||||
---
|
||||
duration_ms: 2.092452
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries
|
||||
ok 37 - startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries
|
||||
---
|
||||
duration_ms: 26.35814
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: startMemoryMaintenanceScheduler skips jobs when feature flags disable memory
|
||||
ok 38 - startMemoryMaintenanceScheduler skips jobs when feature flags disable memory
|
||||
---
|
||||
duration_ms: 11.279543
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: normalizeMemoryItem applies durable schema defaults and coercions
|
||||
ok 39 - normalizeMemoryItem applies durable schema defaults and coercions
|
||||
---
|
||||
duration_ms: 2.535683
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: validateMemoryItem reports field-level errors
|
||||
ok 40 - validateMemoryItem reports field-level errors
|
||||
---
|
||||
duration_ms: 0.538811
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: ingestEvents rejects invalid writes and logs structured validation details
|
||||
ok 41 - ingestEvents rejects invalid writes and logs structured validation details
|
||||
---
|
||||
duration_ms: 5.412329
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: loadMemoryPromptTemplates loads all memory prompt templates from disk
|
||||
ok 42 - loadMemoryPromptTemplates loads all memory prompt templates from disk
|
||||
---
|
||||
duration_ms: 1.458487
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: summarizeEvents retries with repair prompt when first response is malformed JSON
|
||||
ok 43 - summarizeEvents retries with repair prompt when first response is malformed JSON
|
||||
---
|
||||
duration_ms: 2.152071
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice
|
||||
ok 44 - summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice
|
||||
---
|
||||
duration_ms: 1.661533
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: CLI Smoke Test
|
||||
# Subtest: should print usage when no args provided
|
||||
ok 1 - should print usage when no args provided
|
||||
---
|
||||
duration_ms: 169.974982
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: should fail when checking without cadence
|
||||
ok 2 - should fail when checking without cadence
|
||||
---
|
||||
duration_ms: 168.833829
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: should include paused agents in check output
|
||||
ok 3 - should include paused agents in check output
|
||||
---
|
||||
duration_ms: 1032.406098
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
ok 45 - CLI Smoke Test
|
||||
---
|
||||
duration_ms: 1374.103911
|
||||
type: 'suite'
|
||||
...
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
echo "Starting reproduction of npm test timeout..."
|
||||
|
||||
# Run npm test with a timeout to simulate the hang/slow behavior.
|
||||
# The actual issue is a 400s timeout, but we demonstrate it by showing it doesn't complete quickly.
|
||||
timeout 30s npm test > npm_test_output.log 2>&1
|
||||
EXIT_CODE=$?
|
||||
|
||||
if [ $EXIT_CODE -eq 124 ]; then
|
||||
echo "Reproduced: npm test timed out after 30s (demonstration)."
|
||||
echo "See npm_test_output.log for partial output."
|
||||
elif [ $EXIT_CODE -ne 0 ]; then
|
||||
echo "npm test failed with exit code $EXIT_CODE"
|
||||
echo "See npm_test_output.log for output."
|
||||
else
|
||||
echo "npm test passed (unexpected for reproduction, or it was very fast)"
|
||||
fi
|
||||
@@ -8,7 +8,8 @@ const __dirname = path.dirname(__filename);
|
||||
const DIST_DIR = path.join(__dirname, 'dist');
|
||||
const LANDING_SRC = path.join(__dirname, 'landing');
|
||||
const DASHBOARD_SRC = path.join(__dirname, 'dashboard');
|
||||
const DOCS_SRC = path.join(__dirname, 'src', 'docs');
|
||||
const DOCS_SRC = path.join(__dirname, 'docs');
|
||||
const TORCH_MD_SRC = path.join(__dirname, 'TORCH.md');
|
||||
const CONSTANTS_SRC = path.join(__dirname, 'src', 'constants.mjs');
|
||||
const PROMPTS_SRC = path.join(__dirname, 'src', 'prompts', 'META_PROMPTS.md');
|
||||
const CONFIG_SRC = path.join(__dirname, 'torch-config.json');
|
||||
@@ -38,10 +39,15 @@ const distDashboard = path.join(DIST_DIR, 'dashboard');
|
||||
fs.mkdirSync(distDashboard, { recursive: true });
|
||||
fs.cpSync(DASHBOARD_SRC, distDashboard, { recursive: true });
|
||||
|
||||
// 3. Copy src/docs/ -> dist/src/docs/
|
||||
// 3. Copy docs/ -> dist/src/docs/
|
||||
const distDocs = path.join(DIST_DIR, 'src', 'docs');
|
||||
fs.mkdirSync(distDocs, { recursive: true });
|
||||
fs.cpSync(DOCS_SRC, distDocs, { recursive: true });
|
||||
if (fs.existsSync(DOCS_SRC)) {
|
||||
fs.cpSync(DOCS_SRC, distDocs, { recursive: true });
|
||||
}
|
||||
if (fs.existsSync(TORCH_MD_SRC)) {
|
||||
fs.copyFileSync(TORCH_MD_SRC, path.join(distDocs, 'TORCH.md'));
|
||||
}
|
||||
|
||||
// 3.5. Copy src/constants.mjs -> dist/src/constants.mjs
|
||||
fs.copyFileSync(CONSTANTS_SRC, path.join(DIST_DIR, 'src', 'constants.mjs'));
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Daily Perf Report: 2026-02-16
|
||||
|
||||
## Summary
|
||||
Found and fixed a background CPU usage issue in the Agent Dashboard. No content documentation to audit.
|
||||
|
||||
## P0/P1/P2 Findings
|
||||
|
||||
### P1: Dashboard Background Rendering
|
||||
- **File**: `dashboard/index.html`
|
||||
- **Impact**: Unnecessary DOM updates/reflows every 30s when tab is hidden.
|
||||
- **Fix**: Added `document.hidden` check to `setInterval` and added `visibilitychange` listener.
|
||||
- **PR**: `perf: visibility-gate dashboard render loop`
|
||||
|
||||
## Metrics
|
||||
- **Login Time**: N/A (Static Analysis)
|
||||
- **Decrypt Queue**: N/A
|
||||
- **Hits Found**: 3 (1 actionable)
|
||||
|
||||
## Blockers
|
||||
- None.
|
||||
|
||||
## Decisions
|
||||
- See `src/decisions/DECISIONS_2026-02-16.md`
|
||||
@@ -0,0 +1,7 @@
|
||||
# Daily Perf Report 2026-02-17
|
||||
|
||||
## Summary
|
||||
Performance scan completed.
|
||||
|
||||
## Findings
|
||||
See perf/hits-2026-02-17.json for raw hits.
|
||||
+185
-26
@@ -76,6 +76,13 @@
|
||||
|
||||
<div class="flex items-center gap-2 ml-auto">
|
||||
<span id="eventCount" class="text-xs text-muted mono">0 events</span>
|
||||
<button
|
||||
id="settingsBtn"
|
||||
type="button"
|
||||
class="rounded-md bg-surface border border-border px-3 py-1.5 text-sm font-medium text-text hover:bg-surface-alt focus:outline-none focus:ring-2 focus:ring-accent transition-colors"
|
||||
>
|
||||
Settings
|
||||
</button>
|
||||
<button
|
||||
id="refreshBtn"
|
||||
type="button"
|
||||
@@ -164,6 +171,65 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Settings Modal -->
|
||||
<div id="settingsModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close-modal" id="closeSettings">×</span>
|
||||
<h2 class="text-xl font-semibold mb-4 text-text-strong">Dashboard Settings</h2>
|
||||
|
||||
<form id="settingsForm" class="space-y-4">
|
||||
<div>
|
||||
<label for="settingHashtag" class="block text-sm font-medium text-text mb-1">Hashtag (Required)</label>
|
||||
<input
|
||||
type="text"
|
||||
id="settingHashtag"
|
||||
class="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text focus:outline-none focus:ring-2 focus:ring-accent"
|
||||
placeholder="e.g. my-project-lock"
|
||||
required
|
||||
>
|
||||
<p class="text-xs text-muted mt-1">Unique identifier for this project's locks.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="settingNamespace" class="block text-sm font-medium text-text mb-1">Namespace</label>
|
||||
<input
|
||||
type="text"
|
||||
id="settingNamespace"
|
||||
class="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text focus:outline-none focus:ring-2 focus:ring-accent"
|
||||
placeholder="torch"
|
||||
>
|
||||
<p class="text-xs text-muted mt-1">Default: torch</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="settingRelays" class="block text-sm font-medium text-text mb-1">Relays (Comma-separated)</label>
|
||||
<input
|
||||
type="text"
|
||||
id="settingRelays"
|
||||
class="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text focus:outline-none focus:ring-2 focus:ring-accent"
|
||||
placeholder="wss://relay.damus.io, wss://nos.lol"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="pt-4 flex justify-end gap-3">
|
||||
<button
|
||||
type="button"
|
||||
id="cancelSettings"
|
||||
class="rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-text hover:bg-surface-alt"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
class="rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-strong"
|
||||
>
|
||||
Save & Reload
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import { KIND_APP_DATA } from '../src/constants.mjs';
|
||||
import { createElement, escapeHtml } from './domUtils.js';
|
||||
@@ -171,31 +237,95 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// Modal Logic
|
||||
// -----------------------------------------------------------------------
|
||||
const modal = document.getElementById("docsModal");
|
||||
const btn = document.getElementById("openDocs");
|
||||
const span = document.getElementsByClassName("close-modal")[0];
|
||||
const docsModal = document.getElementById("docsModal");
|
||||
const settingsModal = document.getElementById("settingsModal");
|
||||
const openDocsBtn = document.getElementById("openDocs");
|
||||
const openSettingsBtn = document.getElementById("settingsBtn");
|
||||
const closeDocsBtn = document.getElementsByClassName("close-modal")[0];
|
||||
const closeSettingsBtn = document.getElementById("closeSettings");
|
||||
const contentDiv = document.getElementById("markdown-content");
|
||||
let docsLoaded = false;
|
||||
|
||||
if (btn) {
|
||||
btn.onclick = function(e) {
|
||||
// Docs Modal
|
||||
if (openDocsBtn) {
|
||||
openDocsBtn.onclick = function(e) {
|
||||
e.preventDefault();
|
||||
modal.classList.add("show");
|
||||
docsModal.classList.add("show");
|
||||
if (!docsLoaded) {
|
||||
fetchDocs();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (span) {
|
||||
span.onclick = function() {
|
||||
modal.classList.remove("show");
|
||||
if (closeDocsBtn) {
|
||||
closeDocsBtn.onclick = function() {
|
||||
docsModal.classList.remove("show");
|
||||
}
|
||||
}
|
||||
|
||||
// Settings Modal
|
||||
if (openSettingsBtn) {
|
||||
openSettingsBtn.onclick = function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Pre-fill values
|
||||
document.getElementById('settingHashtag').value = HASHTAG;
|
||||
document.getElementById('settingNamespace').value = DASHBOARD_CONFIG.namespace;
|
||||
document.getElementById('settingRelays').value = RELAYS.join(', ');
|
||||
|
||||
settingsModal.classList.add("show");
|
||||
}
|
||||
}
|
||||
|
||||
if (closeSettingsBtn) {
|
||||
closeSettingsBtn.onclick = function() {
|
||||
settingsModal.classList.remove("show");
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('cancelSettings').onclick = function() {
|
||||
settingsModal.classList.remove("show");
|
||||
}
|
||||
|
||||
// Handle Settings Save
|
||||
document.getElementById('settingsForm').onsubmit = function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const newHashtag = document.getElementById('settingHashtag').value.trim();
|
||||
const newNamespace = document.getElementById('settingNamespace').value.trim();
|
||||
const newRelays = document.getElementById('settingRelays').value.split(',').map(r => r.trim()).filter(Boolean);
|
||||
|
||||
if (!newHashtag) {
|
||||
alert('Hashtag is required.');
|
||||
return;
|
||||
}
|
||||
|
||||
const prefs = {
|
||||
hashtag: newHashtag,
|
||||
namespace: newNamespace,
|
||||
relays: newRelays
|
||||
};
|
||||
|
||||
// Save to LocalStorage
|
||||
localStorage.setItem('torch_dashboard_prefs', JSON.stringify(prefs));
|
||||
|
||||
// Update URL to reflect new settings (so link is shareable)
|
||||
const url = new URL(window.location);
|
||||
url.searchParams.set('hashtag', newHashtag);
|
||||
url.searchParams.set('namespace', newNamespace);
|
||||
url.searchParams.set('relays', newRelays.join(','));
|
||||
window.history.pushState({}, '', url);
|
||||
|
||||
// Reload to apply
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
window.onclick = function(event) {
|
||||
if (event.target == modal) {
|
||||
modal.classList.remove("show");
|
||||
if (event.target == docsModal) {
|
||||
docsModal.classList.remove("show");
|
||||
}
|
||||
if (event.target == settingsModal) {
|
||||
settingsModal.classList.remove("show");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,23 +393,46 @@
|
||||
|
||||
function parseDashboardConfig(torchConfig = {}) {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
|
||||
// 1. LocalStorage Preferences
|
||||
let localPrefs = {};
|
||||
try {
|
||||
localPrefs = JSON.parse(localStorage.getItem('torch_dashboard_prefs')) || {};
|
||||
} catch {}
|
||||
|
||||
const dashboardConfig = torchConfig.dashboard || {};
|
||||
const lockConfig = torchConfig.nostrLock || {};
|
||||
|
||||
const configuredNamespace =
|
||||
(dashboardConfig.namespace || lockConfig.namespace || DASHBOARD_DEFAULTS.namespace);
|
||||
const namespace =
|
||||
(params.get('namespace') || configuredNamespace).trim() || DASHBOARD_DEFAULTS.namespace;
|
||||
const hashtag =
|
||||
(params.get('hashtag') || dashboardConfig.hashtag || DASHBOARD_DEFAULTS.hashtag).trim() ||
|
||||
`${namespace}-agent-lock`;
|
||||
const relaysParam = (params.get('relays') || '').trim();
|
||||
const relays = relaysParam
|
||||
? relaysParam
|
||||
.split(',')
|
||||
.map((relay) => relay.trim())
|
||||
.filter(Boolean)
|
||||
: [...(dashboardConfig.relays || lockConfig.relays || DASHBOARD_DEFAULTS.relays)];
|
||||
// Hierarchy: URL Param > LocalStorage > Config File > Default
|
||||
|
||||
// Namespace
|
||||
const configNamespace = dashboardConfig.namespace || lockConfig.namespace || DASHBOARD_DEFAULTS.namespace;
|
||||
const namespace = (
|
||||
params.get('namespace') ||
|
||||
localPrefs.namespace ||
|
||||
configNamespace
|
||||
).trim() || DASHBOARD_DEFAULTS.namespace;
|
||||
|
||||
// Hashtag
|
||||
const configHashtag = dashboardConfig.hashtag || DASHBOARD_DEFAULTS.hashtag;
|
||||
const hashtag = (
|
||||
params.get('hashtag') ||
|
||||
localPrefs.hashtag ||
|
||||
configHashtag ||
|
||||
`${namespace}-agent-lock`
|
||||
).trim();
|
||||
|
||||
// Relays
|
||||
const paramsRelays = params.get('relays') ? params.get('relays').split(',') : null;
|
||||
const localRelays = localPrefs.relays;
|
||||
const configRelays = dashboardConfig.relays || lockConfig.relays || DASHBOARD_DEFAULTS.relays;
|
||||
|
||||
let relays = (paramsRelays || localRelays || configRelays)
|
||||
.map(r => r.trim())
|
||||
.filter(Boolean);
|
||||
|
||||
if (relays.length === 0) relays = DASHBOARD_DEFAULTS.relays;
|
||||
|
||||
const defaultCadenceView = normalizeCadence(dashboardConfig.defaultCadenceView);
|
||||
const defaultStatusView = normalizeStatus(dashboardConfig.defaultStatusView);
|
||||
|
||||
@@ -814,11 +967,17 @@
|
||||
// Periodic TTL refresh
|
||||
// -----------------------------------------------------------------------
|
||||
refreshIntervalId = setInterval(() => {
|
||||
if (isAlive()) {
|
||||
if (isAlive() && !document.hidden) {
|
||||
renderLocks();
|
||||
}
|
||||
}, 30_000);
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (!document.hidden && isAlive()) {
|
||||
renderLocks();
|
||||
}
|
||||
});
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Event handlers
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
> [email protected] dashboard:serve
|
||||
> node bin/torch-lock.mjs dashboard
|
||||
|
||||
node:internal/modules/package_json_reader:314
|
||||
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
|
||||
^
|
||||
|
||||
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nostr-tools' imported from /app/src/lib.mjs
|
||||
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:314:9)
|
||||
at packageResolve (node:internal/modules/esm/resolve:767:81)
|
||||
at moduleResolve (node:internal/modules/esm/resolve:853:18)
|
||||
at defaultResolve (node:internal/modules/esm/resolve:983:11)
|
||||
at #cachedDefaultResolve (node:internal/modules/esm/loader:731:20)
|
||||
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
|
||||
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:310:38)
|
||||
at ModuleJob._link (node:internal/modules/esm/module_job:182:49) {
|
||||
code: 'ERR_MODULE_NOT_FOUND'
|
||||
}
|
||||
|
||||
Node.js v22.22.0
|
||||
npm notice
|
||||
npm notice New minor version of npm available! 11.7.0 -> 11.10.0
|
||||
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.10.0
|
||||
npm notice To update run: npm install -g [email protected]
|
||||
npm notice
|
||||
File renamed without changes.
@@ -0,0 +1,7 @@
|
||||
|
||||
> [email protected] dashboard:serve
|
||||
> node bin/torch-lock.mjs dashboard
|
||||
|
||||
Dashboard running at http://localhost:4173/dashboard/
|
||||
Serving files from /app
|
||||
Using configuration from /app
|
||||
@@ -0,0 +1,23 @@
|
||||
# Incident: `npm test` Timeout in Sandbox Environment
|
||||
|
||||
## Context
|
||||
Running `npm test` as part of the `onboarding-audit-agent` daily check.
|
||||
|
||||
## Observation
|
||||
`npm test` timed out after 401 seconds.
|
||||
The command runs: `npm run validate:scheduler && npm run test:integration:e2e && node --test test/*.test.mjs tests/*.test.js`.
|
||||
- `validate:scheduler` passed (200ms).
|
||||
- `test:integration:e2e` passed (692ms).
|
||||
- `node --test test/*.test.mjs tests/*.test.js` timed out.
|
||||
Individual runs of many test files passed quickly.
|
||||
|
||||
## Action taken
|
||||
Recorded the timeout in `artifacts/onboarding-audit-agent/report.md`.
|
||||
Verified individual tests passed.
|
||||
|
||||
## Validation performed
|
||||
Ran individual tests (`lock-ops.test.mjs`, `lock-acquisition-resilience.integration.test.mjs`, etc.) and they passed.
|
||||
|
||||
## Recommendation for next agents
|
||||
Investigate why running the full suite causes a timeout. It might be resource contention or a specific test that hangs only in the full suite context.
|
||||
Workaround: Run specific test subsets or increase timeout if possible.
|
||||
@@ -0,0 +1,47 @@
|
||||
# TORCH Distribution Strategy: Hybrid "Drop-in"
|
||||
|
||||
## Goal
|
||||
To make TORCH the universal "operating system for AI agents" across all languages and environments, we must remove the dependency on Node.js/NPM for end users while maintaining a robust development experience for contributors.
|
||||
|
||||
## The Problem
|
||||
Currently, TORCH is distributed as a tarball that requires `npm install`. This assumes:
|
||||
1. The user has Node.js installed.
|
||||
2. The user is comfortable with `package.json` and `node_modules`.
|
||||
3. The project is a JavaScript/TypeScript project.
|
||||
|
||||
For Python, Go, or Rust developers, this is friction. A "drop-in" tool should work without language-specific prerequisites.
|
||||
|
||||
## The Solution: Hybrid Distribution
|
||||
|
||||
We will support three primary distribution methods to cover all use cases:
|
||||
|
||||
### 1. The Official NPM Package (Current)
|
||||
**Target Audience:** Node.js / TypeScript developers.
|
||||
**Experience:** `npm install torch-lock` (or similar).
|
||||
**Pros:** seamless integration with existing JS toolchains, easy updates via dependabot/renovate.
|
||||
|
||||
### 2. Standalone Binary CLI (New)
|
||||
**Target Audience:** Python, Rust, Go, and non-Node developers.
|
||||
**Experience:** Download a single binary (`torch`) from GitHub Releases and add it to `$PATH`.
|
||||
**Implementation:**
|
||||
- Use Node.js Single Executable Applications (SEA) or `pkg` to compile the JS source into binaries for Linux, macOS, and Windows.
|
||||
- **Zero Dependencies:** No `npm`, no `node_modules`.
|
||||
- **Fast:** Instant startup, no install process.
|
||||
|
||||
### 3. Hosted Dashboard (New)
|
||||
**Target Audience:** All users (especially those using the binary).
|
||||
**Experience:** A static web app hosted at a public URL (e.g., `dashboard.torch.sh` or GitHub Pages).
|
||||
**Workflow:**
|
||||
1. User runs `torch lock ...` locally.
|
||||
2. CLI prints: `View active locks: https://dashboard.torch.sh/?hashtag=my-project-hash`
|
||||
3. User clicks the link to see the dashboard.
|
||||
**Features:**
|
||||
- **Stateless:** The dashboard is a static HTML/JS file.
|
||||
- **Client-side Logic:** It connects directly to Nostr relays from the browser.
|
||||
- **URL Configuration:** Configuration (hashtag, namespace, relays) is passed via URL query parameters, making links shareable.
|
||||
- **Local Persistence:** Settings are saved to `localStorage` for returning visitors.
|
||||
|
||||
## Benefits
|
||||
- **Universal Access:** Removes the Node.js barrier to entry.
|
||||
- **True "Drop-in":** The binary + hosted dashboard requires *zero* local setup beyond downloading one file.
|
||||
- **Maintainability:** The core logic remains in JavaScript/Node.js, shared across all three distribution methods.
|
||||
@@ -7,10 +7,6 @@
|
||||
<link rel="icon" type="image/svg+xml" href="../assets/favicon.svg">
|
||||
<link rel="stylesheet" href="../dashboard/styles.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
|
||||
mermaid.initialize({ startOnLoad: true, theme: 'dark' });
|
||||
</script>
|
||||
<style>
|
||||
/* Landing Page Specific Overrides & Additions */
|
||||
body {
|
||||
@@ -518,30 +514,6 @@
|
||||
--danger: #ef4444;
|
||||
}
|
||||
|
||||
/* Agent Flow Section */
|
||||
.agent-flow {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto 4rem;
|
||||
padding: 0 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agent-flow h2 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
color: var(--text-strong);
|
||||
}
|
||||
|
||||
.mermaid {
|
||||
background: var(--surface-alt);
|
||||
padding: 2rem;
|
||||
border-radius: 1rem;
|
||||
border: 1px solid var(--border);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Core Capabilities Section */
|
||||
.core-capabilities {
|
||||
max-width: 1200px;
|
||||
@@ -759,30 +731,6 @@ npm install https://github.com/PR0M3TH3AN/TORCH/archive/refs/heads/main.tar.gz &
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="agent-flow">
|
||||
<h2>Autonomous Improvement Cycle</h2>
|
||||
<div class="mermaid">
|
||||
flowchart TD
|
||||
%% Nodes
|
||||
S[Scheduler<br/>Daily & Weekly]
|
||||
C[Candidate Loop<br/>Audit & Check Agents]
|
||||
F[Fixer Agents<br/>Code Correction]
|
||||
P[Prompt Maintenance<br/>Self-Evolution]
|
||||
|
||||
%% Edge Connections
|
||||
S -->|Orchestrates| C
|
||||
C -->|Identifies Gaps| F
|
||||
F -->|Resolves Issues| P
|
||||
P -->|Refines Prompts| S
|
||||
|
||||
%% Styles
|
||||
classDef box fill:#151b2f,stroke:#2a3456,color:#dbe4ff,stroke-width:1px;
|
||||
classDef accent fill:#4f8cff,stroke:#2f6be5,color:#ffffff,stroke-width:2px;
|
||||
|
||||
class S,P accent;
|
||||
class C,F box;
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Changelog Update - 2026-02-17
|
||||
|
||||
Generated draft release notes covering 212 commits.
|
||||
Key areas:
|
||||
- Scheduler automation improvements
|
||||
- Memory management features
|
||||
- Codebase modularization
|
||||
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"file": "dashboard/index.html",
|
||||
"line": 816,
|
||||
"pattern": "setInterval",
|
||||
"snippet": " refreshIntervalId = setInterval(() => {",
|
||||
"risk": "Unbounded background DOM updates",
|
||||
"trigger": "Page load",
|
||||
"impact": "CPU usage when tab is hidden",
|
||||
"priority": "P1"
|
||||
},
|
||||
{
|
||||
"file": "dashboard/index.html",
|
||||
"line": 799,
|
||||
"pattern": "setTimeout",
|
||||
"snippet": " setTimeout(() => {",
|
||||
"risk": "Delayed retry",
|
||||
"trigger": "WebSocket close",
|
||||
"impact": "Low",
|
||||
"priority": "P3"
|
||||
},
|
||||
{
|
||||
"file": "src/services/memory/scheduler.js",
|
||||
"line": 33,
|
||||
"pattern": "setInterval",
|
||||
"snippet": " const handle = setInterval(() => {",
|
||||
"risk": "Background job loop",
|
||||
"trigger": "Server start",
|
||||
"impact": "Necessary backend process",
|
||||
"priority": "P3"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"raw_output": "src/relay-health.mjs: timeoutId = setTimeout(() => reject(new Error(message)), timeoutMs);\nsrc/test_logs/TEST_LOG_2026-02-17T00-00-00Z.md:- Command: grep -rE \"setInterval|setTimeout\" src/\nsrc/lib.mjs: await new Promise((resolve) => setTimeout(resolve, raceCheckDelayMs));\nsrc/prompts/daily/const-refactor-agent.md: - Timeout: look for `setTimeout`, `fetch(..., { timeout: ...})`, `pool.list` timeouts, `BACKGROUND_RELAY_TIMEOUT_MS`.\nsrc/prompts/daily/perf-agent.md:- `setInterval|setTimeout|requestAnimationFrame|requestIdleCallback`\nsrc/prompts/daily/test-audit-agent.md: - Long sleeps: `setTimeout(`, `sleep(`, `await delay(`.\nsrc/prompts/daily/test-audit-agent.md: - `rg \"setTimeout\\\\(|sleep\\\\(|await delay\\\\(|new Promise\\\\(r => setTimeout\" -n`\nsrc/prompts/daily/test-audit-agent.md: 1. **Test-fix PR** — add missing assertions, replace `setTimeout` sleeps with `waitFor`, or mock timers. Include `src/context/CONTEXT_<timestamp>.md`, `src/todo/TODO_<timestamp>.md`, `src/test_logs/TEST_LOG_<timestamp>.md`.\nsrc/prompts/daily/test-audit-agent.md:- Replace `await new Promise(r => setTimeout(r, 1000))` with a deterministic `await waitFor(() => condition)` or mock timers.\nsrc/cmd-lock.mjs: await new Promise((resolve) => setTimeout(resolve, RACE_CHECK_DELAY_MS));\nsrc/lock-ops.mjs: timeoutHandle = setTimeout(() => reject(new Error(timeoutMessage)), timeoutMs);\nsrc/lock-ops.mjs: sleepFn = (ms) => new Promise((resolve) => setTimeout(resolve, ms)),\nsrc/services/memory/scheduler.js: const handle = setInterval(() => {\nsrc/services/memory/scheduler.js: setTimeout(resolve, options.retryDelayMs);\nsrc/services/memory/scheduler.js: const intervalHandle = setInterval(run, definition.intervalMs);\nsrc/services/memory/scheduler.js: const timeout = setTimeout(async () => {"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
# Protocol Compliance Report - 2026-02-17
|
||||
|
||||
**Agent:** protocol-research-agent
|
||||
**Date:** 2026-02-17
|
||||
|
||||
## Executive Summary
|
||||
The repository maintains strong compliance with core Nostr specifications (NIP-01, NIP-33) and leverages NIP-78 (Application-specific Data) effectively for its distributed locking mechanism. Protocol usage is centralized in `src/lock-ops.mjs` and `src/relay-health.mjs`.
|
||||
|
||||
## Findings
|
||||
|
||||
### 1. Nostr Protocol Compliance
|
||||
- **NIP-01 (Basic Protocol):** Fully implemented via `nostr-tools`.
|
||||
- **NIP-33 (Parameterized Replaceable Events):** Correctly used for managing lock state updates via `d` tags.
|
||||
- **NIP-40 (Expiration Timestamp):** Implemented in `src/lock-ops.mjs`. The `expiration` tag is parsed and respected during lock validation, ensuring stale locks are automatically pruned.
|
||||
- **NIP-78 (Application-specific Data):** Kind 30078 is the primary vehicle for lock data, aligning with the spec's intent for non-social app data.
|
||||
|
||||
### 2. Custom Protocol Usage
|
||||
- **Relay Health Probes (Kind 27235):** `src/relay-health.mjs` uses an ephemeral event Kind `27235` to test relay write/read round-trip capability. This appears to be an internal convention or experimental kind not yet standardized.
|
||||
- **Risk Assessment:** Low. The events are ephemeral and scoped to the application namespace.
|
||||
|
||||
### 3. Web & Transport
|
||||
- **HTTP/1.1:** `src/dashboard.mjs` implements a standard Node.js HTTP server for the dashboard UI.
|
||||
- **WebSocket:** Raw `ws` usage in `src/relay-health.mjs` provides fine-grained control for connection health checks, complementing the higher-level `SimplePool` abstraction.
|
||||
|
||||
### 4. Gaps & Unknowns
|
||||
- **NIP-42 (Authentication):** Not currently implemented. As relay ecosystem evolves, paid/auth-required relays may become inaccessible without NIP-42 support.
|
||||
|
||||
## Recommendations
|
||||
|
||||
1. **Document Custom Kinds:** Ensure Kind 27235 is clearly documented as internal-only to prevent confusion with standardized kinds.
|
||||
2. **Monitor NIP-42:** Keep NIP-42 on the roadmap if relay reliability issues arise due to auth requirements.
|
||||
3. **Maintain Dependency Hygiene:** Continue pinning `nostr-tools` to avoid upstream breaking changes in protocol implementation.
|
||||
@@ -0,0 +1,234 @@
|
||||
# Draft Release Notes - 2026-02-17
|
||||
|
||||
## Highlights
|
||||
- Significant updates to scheduler automation and memory management.
|
||||
- Modularization of `src/lib.mjs` into smaller components.
|
||||
- New agents added to daily/weekly rosters.
|
||||
|
||||
## Features
|
||||
- 268248b feat: add hosted dashboard configuration and distribution plan (google-labs-jules[bot])
|
||||
- eb1407a fix(prompts): add missing H1 headers to resolve schema validation failures (google-labs-jules[bot])
|
||||
- 77df77a feat: execute daily docs-alignment-agent (google-labs-jules[bot])
|
||||
- 18252ce feat(landing): add core capabilities section and fix meta-prompt path (google-labs-jules[bot])
|
||||
- c363040 docs: add "Why Run Torch?" features section to README (google-labs-jules[bot])
|
||||
- 0dad8e4 feat: prioritize Jules on landing page with new agent selector and natural language install prompt (google-labs-jules[bot])
|
||||
- 3f3f45b feat: ensure torch init installs full application package (google-labs-jules[bot])
|
||||
- 118c365 Merge branch 'main' into feat/nostr-platform-model-info-17811919130475421613 (thePR0M3TH3AN)
|
||||
- 512a041 feat: truncate logs and inject memory into prompts to reduce token burn (google-labs-jules[bot])
|
||||
- 64f22cd feat(scheduler): implement smoke-agent and complete weekly run (google-labs-jules[bot])
|
||||
- 287c33e feat: Run audit-agent daily cycle (google-labs-jules[bot])
|
||||
- cbc5054 feat: make lock event hashtag configurable via config and env var (google-labs-jules[bot])
|
||||
- 01b26c1 Fix dashboard pagination styling and layout by adding missing CSS classes and styles (google-labs-jules[bot])
|
||||
- 4c59c94 Merge branch 'main' into feature/dashboard-modal-docs-2259273807106788000 (thePR0M3TH3AN)
|
||||
- 15b6f4c feat: Add prompt gap analysis agent and refactor for portability (google-labs-jules[bot])
|
||||
- 41f3775 feat: add pagination to dashboard and fix mjs mime type (google-labs-jules[bot])
|
||||
- f5e857b feat: support linux platform in agent runner (google-labs-jules[bot])
|
||||
- 00e3b1e feat: add prompt-fixer-agent to automatically resolve safety audit findings (google-labs-jules[bot])
|
||||
- 969b72d Add scheduler error rendering snapshot coverage (thePR0M3TH3AN)
|
||||
- 6259f7f Add ci-resilience lock acquisition test suite (thePR0M3TH3AN)
|
||||
- c1d0de0 test: add scheduler lock failure frontmatter contract coverage (thePR0M3TH3AN)
|
||||
- ccc76d8 Add scheduler lock preflight e2e coverage (thePR0M3TH3AN)
|
||||
- 4349485 Add relay fanout quorum integration tests (thePR0M3TH3AN)
|
||||
- aad60b7 test: add publish retry matrix coverage for lock backend (thePR0M3TH3AN)
|
||||
- 1e97118 Add relay health preflight job and scheduler deferral handling (thePR0M3TH3AN)
|
||||
- 9aad0d9 Add lock deferral policy for scheduler backend failures (thePR0M3TH3AN)
|
||||
- f22bcfb Add bounded retry logic for lock publish quorum (thePR0M3TH3AN)
|
||||
- dd27f28 feat(ai): add load-test-agent script (google-labs-jules[bot])
|
||||
- bc51e2f Add scheduler relay health preflight gate (thePR0M3TH3AN)
|
||||
- 9c069f7 Add scheduler lock retries for backend failures (thePR0M3TH3AN)
|
||||
- 0f3fd32 feat: random namespace generation in init (google-labs-jules[bot])
|
||||
- b92f0ef feat(security): migrate dashboard innerHTML to safe DOM APIs (google-labs-jules[bot])
|
||||
- e4f700b Add scheduler flow parity validation script (thePR0M3TH3AN)
|
||||
- 26b65f2 Add scheduler handoff runner for selected prompts (thePR0M3TH3AN)
|
||||
- 0076f3e Normalize daily/weekly prompt contract and add validator (thePR0M3TH3AN)
|
||||
- 4b6ed0b Add scheduler handoff commands for daily and weekly cadences (thePR0M3TH3AN)
|
||||
- 5221225 Add scheduler run artifact compliance gate (thePR0M3TH3AN)
|
||||
- fce1256 feat(scheduler): add single-command scheduler cycle runner (thePR0M3TH3AN)
|
||||
- d44b09e Standardize prompt artifact paths and add canonical reference (thePR0M3TH3AN)
|
||||
- 83413e5 docs(prompts): add shared agent run contract and link all cadence prompts (thePR0M3TH3AN)
|
||||
- 5b0cf98 Align scheduler tables with roster and add drift check (thePR0M3TH3AN)
|
||||
- d158622 Add memory rollout feature flags and docs (thePR0M3TH3AN)
|
||||
- 420df2d test(memory): add deterministic end-to-end memory test suite (thePR0M3TH3AN)
|
||||
- 7cef824 Add memory admin CLI hooks and safe telemetry events (thePR0M3TH3AN)
|
||||
- 5e609fa feat(memory): inject retrieval context into final prompt rendering (thePR0M3TH3AN)
|
||||
- 3ddd050 feat(memory): add distributed-safe maintenance scheduler jobs (thePR0M3TH3AN)
|
||||
- b8d4d2a Add pluggable memory embedder adapter and vector metadata (thePR0M3TH3AN)
|
||||
- 3665aa0 Add memory prompt templates and robust JSON summarization (thePR0M3TH3AN)
|
||||
- 3c24b29 Add scoped runtime memory cache with LRU and metrics (thePR0M3TH3AN)
|
||||
- 99248b5 Add memory persistence migration and repository adapter methods (thePR0M3TH3AN)
|
||||
- 5f9b1a2 Add durable memory schema validation in ingest pipeline (thePR0M3TH3AN)
|
||||
- 9c25245 Add modular memory service API scaffold (thePR0M3TH3AN)
|
||||
- 7a8bab4 I have implemented 'torch-lock complete' for persistent task history. This involved adding `cmdComplete` to `src/lib.mjs` to handle permanent completion events, updating `cmdLock` to prevent locking completed tasks, modifying `cmdList` to show 'done' status, exposing the command in the CLI, and adding the necessary unit tests. (google-labs-jules[bot])
|
||||
- 433b81d feat: implement scheduler ratcheting by excluding completed tasks (google-labs-jules[bot])
|
||||
- 92fa38c feat(landing): add mermaid improvement cycle diagram (google-labs-jules[bot])
|
||||
- f931b44 test: add unit tests for parseLockEvent (google-labs-jules[bot])
|
||||
- 3a48c76 Add unit tests for loadTorchConfig with dependency injection (google-labs-jules[bot])
|
||||
- 56694d1 Verify hardcoded relays are moved and add regression tests (google-labs-jules[bot])
|
||||
- 983ad06 🧹 improve observability by adding console.debug to empty catch blocks (google-labs-jules[bot])
|
||||
- c63a4d6 feat: add prompt-maintenance-agent and remove obsolete agents (google-labs-jules[bot])
|
||||
- 647724b 🧪 Add unit tests for src/torch-config.mjs and refactor for testability (google-labs-jules[bot])
|
||||
- ac7ba2a feat: add required acknowledgement warning to install copy button (google-labs-jules[bot])
|
||||
- d165c06 feat: extract DEFAULT_DASHBOARD_PORT and RACE_CHECK_DELAY_MS to src/constants.mjs (google-labs-jules[bot])
|
||||
- b0381b8 feat: add init and update commands for user-space configuration (google-labs-jules[bot])
|
||||
- c7e48e6 feat(landing): add npm install command section (google-labs-jules[bot])
|
||||
- 9bea7a6 feat(agent): frontend-console-debug-agent run (no errors) (google-labs-jules[bot])
|
||||
- 3a96088 feat: add feature-proposer-agent log validation script (google-labs-jules[bot])
|
||||
- f8331a3 feat: add new flamey logo and favicon (google-labs-jules[bot])
|
||||
- adaeac5 feat: add completed task filter and styling to dashboard (google-labs-jules[bot])
|
||||
- 27c30f7 feat: add scheduler pause configuration (google-labs-jules[bot])
|
||||
- a09c2e4 feat: add prompt-safety-agent to weekly roster (google-labs-jules[bot])
|
||||
- 32596be feat(agents): add ui-ux-agent to weekly roster (google-labs-jules[bot])
|
||||
- 2a2b95d feat: add feature-proposer-agent to weekly roster (google-labs-jules[bot])
|
||||
- fe3069c feat(agents): add log-fixer-agent to daily roster (google-labs-jules[bot])
|
||||
- 002d426 feat: execute weekly changelog-agent task (google-labs-jules[bot])
|
||||
- 782d9f5 Add Daily and Weekly meta prompts to landing page with copy functionality (google-labs-jules[bot])
|
||||
- 2b0118d Fix 4everland deployment by adding build script (google-labs-jules[bot])
|
||||
- 73ec263 Update landing page GitHub and add tipjar link (thePR0M3TH3AN)
|
||||
- b0f47e4 Add landing page with TORCH documentation modal (google-labs-jules[bot])
|
||||
- cd1cd4b docs(prompts): add torch garbage collection daily agent (thePR0M3TH3AN)
|
||||
- 246f275 Add skills folder and weekly repo-fit prompt (thePR0M3TH3AN)
|
||||
- 8d5e7e0 docs: add generic agent onboarding and handoff guidance (thePR0M3TH3AN)
|
||||
- 579655d feat: add per-project torch-config for lock and scheduler defaults (thePR0M3TH3AN)
|
||||
- 9e4cf8b Add dashboard utility stylesheet and wire it in head (thePR0M3TH3AN)
|
||||
|
||||
## Fixes
|
||||
- edcd18c Merge pull request #211 from PR0M3TH3AN/agents/weekly/bug-reproducer-agent-repro-test-timeout-16134062700196056924 (thePR0M3TH3AN)
|
||||
- d41d3bf Merge branch 'main' into agents/weekly/bug-reproducer-agent-repro-test-timeout-16134062700196056924 (thePR0M3TH3AN)
|
||||
- 5f35dde Fix dashboard build failure and missing documentation (google-labs-jules[bot])
|
||||
- 37e556f fix(log-fixer): resolve daily agent failures (google-labs-jules[bot])
|
||||
- d23e6ff Refactor memory scripts and fix configuration for new installs (google-labs-jules[bot])
|
||||
- d02fa41 fix(scheduler): relax prompt validation and correct default lint command (google-labs-jules[bot])
|
||||
- 6d2af25 fix(init): ensure torch-config.json is created in project root (google-labs-jules[bot])
|
||||
- 1d40974 Fix race condition in `cmdLock` sort order (google-labs-jules[bot])
|
||||
- 0b28e4c run(weekly/prompt-fixer-agent): automate prompt safety fixes (google-labs-jules[bot])
|
||||
- eff5f1d chore: run daily perf-agent and fix validation (google-labs-jules[bot])
|
||||
- 6d99f2a run(daily): log-fixer-agent (google-labs-jules[bot])
|
||||
- 711f2bc docs(prompts): fix canonical artifact paths and lint invalid refs (thePR0M3TH3AN)
|
||||
- 6d07244 Fix torch-lock init command and update landing page instructions (google-labs-jules[bot])
|
||||
- 279e392 Merge branch 'main' into fix-dashboard-binding-9664858879592007216 (thePR0M3TH3AN)
|
||||
- af9b7e8 perf(torch): fix 15s delay in lock queries by clearing timeout (google-labs-jules[bot])
|
||||
- 36cd585 fuzz-agent: fix parseLockEvent crash on null content (google-labs-jules[bot])
|
||||
- 126ca22 fix(package): include assets/ directory in npm package (google-labs-jules[bot])
|
||||
- ec8969d Merge branch 'main' into audit-agent-fix-2548023414882189291 (thePR0M3TH3AN)
|
||||
- e03cb64 fix(dashboard): normalize platform names for lock cards (google-labs-jules[bot])
|
||||
- aeec529 fix(dashboard): resolve refresh filter reset and relay counter leak (google-labs-jules[bot])
|
||||
- 066a10c chore(scheduler): Execute bug-reproducer-agent for weekly run (google-labs-jules[bot])
|
||||
|
||||
## Documentation
|
||||
- 8b5cec4 Consolidate agent docs into TORCH.md and update installer (google-labs-jules[bot])
|
||||
- 58c4f14 docs(prompts): sync roster.json and scheduler rosters (google-labs-jules[bot])
|
||||
- aff47a7 docs(scheduler): daily run for docs-code-investigator (google-labs-jules[bot])
|
||||
- e0245e2 docs(prompts): sync scheduler rosters (google-labs-jules[bot])
|
||||
- e267c5b docs(scheduler): run onboarding-audit-agent task (google-labs-jules[bot])
|
||||
- 874747d Classify scheduler failures and document lock remediation (thePR0M3TH3AN)
|
||||
- 5e74287 Align scheduler flow docs with runtime behavior (thePR0M3TH3AN)
|
||||
- 426b322 chore(ai): document src/lib.mjs (google-labs-jules[bot])
|
||||
- 8f34803 Align scheduler flow docs with automation behavior (thePR0M3TH3AN)
|
||||
- 76f40c1 Merge branch 'main' into agents/daily/docs-alignment-agent-2026-02-14-6397839808698049185 (thePR0M3TH3AN)
|
||||
- 7d67df9 Update docs to use torch-lock entrypoint (thePR0M3TH3AN)
|
||||
- 8239b41 docs(prompts): align scheduler update prompt with roster source (thePR0M3TH3AN)
|
||||
- e8ff52c Align scheduler docs to cmdCheck excluded schema (thePR0M3TH3AN)
|
||||
- 50f535a docs(docs-agent): audit and update development commands (google-labs-jules[bot])
|
||||
- 9bf04a3 Standardize install docs on GitHub tarball distribution (thePR0M3TH3AN)
|
||||
- 1d81e9f docs: daily content audit (no content found) (google-labs-jules[bot])
|
||||
- b9be5e3 docs(log): interop-agent failure (google-labs-jules[bot])
|
||||
- 1619246 docs(agents): sync scheduler rosters with prompt directory (google-labs-jules[bot])
|
||||
- ce453a6 Refactor agent docs to repository-agnostic workflow (thePR0M3TH3AN)
|
||||
- e541053 Refactor agent docs to be fully repo-agnostic (thePR0M3TH3AN)
|
||||
- aca8ca0 docs(scheduler): define deterministic roster selection algorithm (thePR0M3TH3AN)
|
||||
- 4fbdd1a docs: align lock examples with default documentation-agent (thePR0M3TH3AN)
|
||||
|
||||
## Refactoring
|
||||
- c0972af [decompose] extract getCompletedAgents from src/lib.mjs (google-labs-jules[bot])
|
||||
- dba1d43 refactor(core): extract parseArgs to cli-parser.mjs (google-labs-jules[bot])
|
||||
- d46aa0b Merge branch 'main' into refactor/valid-cadences-7741695179358615025 (thePR0M3TH3AN)
|
||||
- 0a7f64d Refactor lock filtering to use Set lookups instead of linear scans (google-labs-jules[bot])
|
||||
- 02e96d4 Refactor magic number 30078 to KIND_APP_DATA constant (google-labs-jules[bot])
|
||||
- 6fdc092 refactor: make exclusions in check scripts configurable (google-labs-jules[bot])
|
||||
- fdfbb39 Decompose src/lib.mjs (google-labs-jules[bot])
|
||||
- 758d3c3 Refactor ensureDir to remove redundant existence check (google-labs-jules[bot])
|
||||
- eee6dfa Refactor cmdInit and cmdUpdate to be synchronous (google-labs-jules[bot])
|
||||
- 581dc34 [decompose] extract modules from src/lib.mjs (google-labs-jules[bot])
|
||||
- 35092b3 Refactor torch-lock into an installable NPM library and CLI (google-labs-jules[bot])
|
||||
- bb55f37 Refactor AGENTS and CLAUDE for repo-agnostic guidance (thePR0M3TH3AN)
|
||||
- 1bde691 refactor(prompts): generalize scheduled agent prompts and rosters (thePR0M3TH3AN)
|
||||
|
||||
## Performance
|
||||
- 2df15cb chore(scheduler): execute daily perf-agent cycle (google-labs-jules[bot])
|
||||
- 19af4dc perf: visibility-gate dashboard render loop (google-labs-jules[bot])
|
||||
- 30d758a Merge branch 'main' into perf/dashboard-async-io-13493420652733485580 (thePR0M3TH3AN)
|
||||
- cd7b19e Optimize dashboard static file serving with async I/O (google-labs-jules[bot])
|
||||
- b044570 ⚡ optimize: replace blocking sync I/O in dashboard request handler (google-labs-jules[bot])
|
||||
- 9716fe3 perf: parallelize daily/weekly lock queries in list command (google-labs-jules[bot])
|
||||
|
||||
## Testing
|
||||
- e709872 chore(scheduler): execute weekly test-coverage-agent run (google-labs-jules[bot])
|
||||
- b1eb7f0 Run daily test-audit-agent (google-labs-jules[bot])
|
||||
- 716b28f Merge branch 'main' into unit-tests-lib-mjs-1840636568505209047 (thePR0M3TH3AN)
|
||||
- 44919f2 chore(scheduler): run daily test-audit-agent (google-labs-jules[bot])
|
||||
- 1c0a10d Update dashboard lock dedupe to prefer latest dTag event (thePR0M3TH3AN)
|
||||
|
||||
## Chores
|
||||
- ac8001c chore(scheduler): complete style-agent run (google-labs-jules[bot])
|
||||
- 639fd6b chore(daily): execute protocol-research-agent (google-labs-jules[bot])
|
||||
- bccc279 chore(daily): run onboarding-audit-agent (google-labs-jules[bot])
|
||||
- a41b00e chore(scheduler): execute daily design-system-audit-agent (google-labs-jules[bot])
|
||||
- ab685bf Run daily agent: deps-security-agent (failed) (google-labs-jules[bot])
|
||||
- 30e12b6 chore(scheduler): weekly telemetry-agent run (google-labs-jules[bot])
|
||||
- 65988c9 chore: run daily ci-health-agent (google-labs-jules[bot])
|
||||
- 00ce5af chore(scheduler): Run todo-triage-agent daily (google-labs-jules[bot])
|
||||
- fcfc9d0 chore: run daily protocol-research-agent (google-labs-jules[bot])
|
||||
- d076111 chore(scheduler): run pr-review-agent (google-labs-jules[bot])
|
||||
- 2aa0b80 deps-security-agent: daily audit (google-labs-jules[bot])
|
||||
- f50c31c chore: update agent prompts to read AGENTS.md and CLAUDE.md (google-labs-jules[bot])
|
||||
- 0de8865 chore(scheduler): execute ci-health-agent (google-labs-jules[bot])
|
||||
- 2c4cee3 chore(scheduler): run event-schema-agent (failed) (google-labs-jules[bot])
|
||||
- b707a20 chore(dead-code): weekly sweep (google-labs-jules[bot])
|
||||
- 130e405 chore: daily todo triage agent run (google-labs-jules[bot])
|
||||
- 1065536 chore(scheduler): run style-agent daily task (google-labs-jules[bot])
|
||||
|
||||
## Other
|
||||
- 6425f57 Remove Mermaid diagram section from landing page (google-labs-jules[bot])
|
||||
- 6313c08 Enable persistence for Torch agent memory system (google-labs-jules[bot])
|
||||
- 44884cc Make memory system usable by agents via file-based I/O (google-labs-jules[bot])
|
||||
- 5c3a2db Weekly Agent Run: weekly-synthesis-agent (google-labs-jules[bot])
|
||||
- e2339b1 Weekly Agent Run: ui-ux-agent (google-labs-jules[bot])
|
||||
- 487081f Improve torch init experience with interactive prompts and script injection (google-labs-jules[bot])
|
||||
- c6428c4 Implement persistent JSON memory store and disable embeddings (google-labs-jules[bot])
|
||||
- 703c351 [constants] replace magic number 30078 with KIND_APP_DATA in cmd-lock.mjs (google-labs-jules[bot])
|
||||
- ee9caff Daily run: style-agent (google-labs-jules[bot])
|
||||
- eddfbd7 Weekly prompt-safety-agent run: Audited 41 prompts (google-labs-jules[bot])
|
||||
- 46198a5 Improve lock publish diagnostics and scheduler failure summaries (thePR0M3TH3AN)
|
||||
- 57ba0fe Improve lock relay health ranking and quarantine handling (thePR0M3TH3AN)
|
||||
- fb079a4 Log daily scheduler lock backend failure (thePR0M3TH3AN)
|
||||
- 84d3e7e Harden lock backend config validation and fallback behavior (thePR0M3TH3AN)
|
||||
- ecb26df Improve scheduler lock observability and reliability reporting (thePR0M3TH3AN)
|
||||
- c38dfe1 Enrich scheduler lock backend failure logging (thePR0M3TH3AN)
|
||||
- 8c2bff9 Log weekly scheduler lock backend failure (thePR0M3TH3AN)
|
||||
- 827c703 Harden scheduler log candidate selection (thePR0M3TH3AN)
|
||||
- 26d9c3d scheduler: run known-issues-agent (daily) (google-labs-jules[bot])
|
||||
- 909a7f9 Strengthen run-artifact verification metadata and issue linkage (thePR0M3TH3AN)
|
||||
- 317169c Align scheduler prompts to scheduler-owned completion model (thePR0M3TH3AN)
|
||||
- 74a4e4d Make scheduler memory commands run-scoped and context-aware (thePR0M3TH3AN)
|
||||
- aec210b Strengthen run artifact content validation (thePR0M3TH3AN)
|
||||
- ab933f8 Wire scheduler memory policy to real memory services (thePR0M3TH3AN)
|
||||
- c74f81c Enforce scheduler memory evidence for daily and weekly (thePR0M3TH3AN)
|
||||
- d997963 Enforce scheduler memory workflow and verification (thePR0M3TH3AN)
|
||||
- a48f874 Require scheduler handoff command for valid task execution (thePR0M3TH3AN)
|
||||
- bdcc82c Clarify scheduler failure flow before lock completion (thePR0M3TH3AN)
|
||||
- 07ceede Normalize KNOWN_ISSUES path in prompts (thePR0M3TH3AN)
|
||||
- 136493b Clarify scheduler completion publish flow (thePR0M3TH3AN)
|
||||
- 1061542 Implement memory pruning lifecycle planning and actions (thePR0M3TH3AN)
|
||||
- 0236958 Implement vector-aware memory retrieval and prompt formatter (thePR0M3TH3AN)
|
||||
- 8e1ff73 Implement batched memory ingestion pipeline with dedupe (thePR0M3TH3AN)
|
||||
- c068565 daily: design-system-audit-agent run (google-labs-jules[bot])
|
||||
- eb7ce14 Package audit scripts and update prompts for consumer repos (google-labs-jules[bot])
|
||||
- 6dd66ab Update install snippets to GitHub npm source (thePR0M3TH3AN)
|
||||
- 966d8ed Audit Agent Run: Failed due to missing scripts (google-labs-jules[bot])
|
||||
- e981003 Record weekly scheduler lock backend failure (thePR0M3TH3AN)
|
||||
- cf64f49 Record daily scheduler failure for torch-garbage-collection-agent lock (thePR0M3TH3AN)
|
||||
- 67d8c82 run(daily): torch-garbage-collection-agent (google-labs-jules[bot])
|
||||
- f1bf8af Refine agent onboarding and generic handoff guidance (thePR0M3TH3AN)
|
||||
- 75094a4 Align lock roster with scheduler prompts (thePR0M3TH3AN)
|
||||
- 2e945c4 Clarify scheduler log-directory bootstrap and first-run behavior (thePR0M3TH3AN)
|
||||
- acd19eb Make scheduler policy-read step conditional (thePR0M3TH3AN)
|
||||
@@ -0,0 +1,32 @@
|
||||
import fs from 'fs';
|
||||
|
||||
const fix = (filePath) => {
|
||||
let content = fs.readFileSync(filePath, 'utf8');
|
||||
const header = '| # | Agent Name | Prompt File |\n|---|------------|-------------|';
|
||||
|
||||
const parts = content.split(header);
|
||||
if (parts.length < 2) return; // Should not happen
|
||||
|
||||
const pre = parts[0];
|
||||
const post = parts[1];
|
||||
|
||||
const lines = post.split('\n');
|
||||
const tableLines = [];
|
||||
let i = 0;
|
||||
|
||||
// Skip initial empty lines if any (though usually generateTable doesn't add them at start)
|
||||
while(i < lines.length && lines[i].trim() === '') i++;
|
||||
|
||||
// Capture rows
|
||||
while(i < lines.length && lines[i].trim().startsWith('|')) {
|
||||
tableLines.push(lines[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
const newContent = pre + header + '\n' + tableLines.join('\n') + '\n';
|
||||
fs.writeFileSync(filePath, newContent);
|
||||
console.log(`Fixed ${filePath}`);
|
||||
};
|
||||
|
||||
fix('src/prompts/daily-scheduler.md');
|
||||
fix('src/prompts/weekly-scheduler.md');
|
||||
+71
-28
@@ -1,5 +1,5 @@
|
||||
import { ingestEvents } from '../../src/services/memory/index.js';
|
||||
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
// Parse environment variables
|
||||
@@ -29,33 +29,75 @@ if (promptPath) {
|
||||
}
|
||||
}
|
||||
|
||||
const baseTs = Date.now();
|
||||
const events = [
|
||||
{
|
||||
agent_id: agentId,
|
||||
content: `Store memory event A for ${cadence} :: ${promptIntent}`,
|
||||
timestamp: baseTs,
|
||||
tags: ['scheduler', cadence, 'store'],
|
||||
metadata: {
|
||||
session_id: runId,
|
||||
source: 'scheduler-store',
|
||||
importance: 0.55,
|
||||
prompt_path: promptPath
|
||||
}
|
||||
},
|
||||
{
|
||||
agent_id: agentId,
|
||||
content: `Store memory event B for ${cadence} :: ${promptIntent}`,
|
||||
timestamp: baseTs + 1,
|
||||
tags: ['scheduler', cadence, 'store'],
|
||||
metadata: {
|
||||
session_id: runId,
|
||||
source: 'scheduler-store',
|
||||
importance: 0.55,
|
||||
prompt_path: promptPath
|
||||
}
|
||||
// Check for memory input file
|
||||
let memoryContent = '';
|
||||
const cliArgs = process.argv.slice(2);
|
||||
const fileArgIndex = cliArgs.indexOf('--file');
|
||||
const explicitFile = fileArgIndex !== -1 ? cliArgs[fileArgIndex + 1] : null;
|
||||
const defaultFile = 'memory-update.md';
|
||||
|
||||
if (explicitFile && existsSync(explicitFile)) {
|
||||
try {
|
||||
memoryContent = readFileSync(explicitFile, 'utf8').trim();
|
||||
console.log(`Loaded memory content from ${explicitFile}`);
|
||||
} catch (err) {
|
||||
console.warn(`Failed to read memory file ${explicitFile}:`, err.message);
|
||||
}
|
||||
];
|
||||
} else if (!explicitFile && existsSync(defaultFile)) {
|
||||
try {
|
||||
memoryContent = readFileSync(defaultFile, 'utf8').trim();
|
||||
console.log(`Loaded memory content from default file ${defaultFile}`);
|
||||
} catch (err) {
|
||||
console.warn(`Failed to read default memory file ${defaultFile}:`, err.message);
|
||||
}
|
||||
}
|
||||
|
||||
const baseTs = Date.now();
|
||||
let events = [];
|
||||
|
||||
if (memoryContent) {
|
||||
events.push({
|
||||
agent_id: agentId,
|
||||
content: memoryContent,
|
||||
timestamp: baseTs,
|
||||
tags: ['scheduler', cadence, 'store', 'insight'],
|
||||
metadata: {
|
||||
session_id: runId,
|
||||
source: 'agent-output',
|
||||
importance: 0.8, // User-provided memory is important
|
||||
prompt_path: promptPath
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Fallback if no file provided (preserve existing behavior for compatibility)
|
||||
console.warn('No memory input found (checked --file or default memory-update.md). using fallback placeholder.');
|
||||
events = [
|
||||
{
|
||||
agent_id: agentId,
|
||||
content: `Store memory event A for ${cadence} :: ${promptIntent}`,
|
||||
timestamp: baseTs,
|
||||
tags: ['scheduler', cadence, 'store'],
|
||||
metadata: {
|
||||
session_id: runId,
|
||||
source: 'scheduler-store',
|
||||
importance: 0.55,
|
||||
prompt_path: promptPath
|
||||
}
|
||||
},
|
||||
{
|
||||
agent_id: agentId,
|
||||
content: `Store memory event B for ${cadence} :: ${promptIntent}`,
|
||||
timestamp: baseTs + 1,
|
||||
tags: ['scheduler', cadence, 'store'],
|
||||
metadata: {
|
||||
session_id: runId,
|
||||
source: 'scheduler-store',
|
||||
importance: 0.55,
|
||||
prompt_path: promptPath
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
try {
|
||||
// 1. Ingest events
|
||||
@@ -77,7 +119,8 @@ try {
|
||||
agentId,
|
||||
promptPath,
|
||||
promptIntent,
|
||||
events: events.length
|
||||
events: events.length,
|
||||
sourceFile: explicitFile || (memoryContent ? defaultFile : 'fallback')
|
||||
},
|
||||
outputs: {
|
||||
storedCount: stored.length,
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:30] "GET /dashboard/index.html HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:30] "GET /dashboard/styles.css HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:30] "GET /assets/logo.svg HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:31] "GET /src/constants.mjs HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:31] "GET /dashboard/domUtils.js HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:31] "GET /torch-config.json HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [15/Feb/2026 17:02:31] "GET /src/docs/TORCH.md HTTP/1.1" 200 -
|
||||
@@ -0,0 +1,19 @@
|
||||
# Context: perf-agent (2026-02-16)
|
||||
|
||||
## Goal
|
||||
Improve app responsiveness by finding and fixing background CPU/network work.
|
||||
|
||||
## Scope
|
||||
- Focus on "Visibility gating" for `dashboard/index.html`.
|
||||
- Run grep searches for performance patterns.
|
||||
- Ensure `INITIAL_BASELINE.md` exists.
|
||||
|
||||
## Constraints
|
||||
- Minimal changes.
|
||||
- Safe changes only.
|
||||
- No network access to external sites.
|
||||
- Running as a simulated agent (Jules).
|
||||
|
||||
## Assumptions
|
||||
- `dashboard/index.html` is the primary entry point for the dashboard.
|
||||
- `setInterval` in `dashboard/index.html` runs even when tab is hidden, wasting CPU.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-17T00-00-00Z
|
||||
prompt: src/prompts/daily/perf-agent.md
|
||||
---
|
||||
# Context
|
||||
|
||||
**Goal**: Execute daily performance audit and reporting.
|
||||
**Scope**: Scan codebase for performance patterns.
|
||||
**Constraints**: Read-only analysis.
|
||||
|
||||
References: src/prompts/daily/perf-agent.md
|
||||
@@ -0,0 +1,3 @@
|
||||
# Context for Scheduler Update Agent
|
||||
|
||||
Run manually to sync roster.
|
||||
@@ -0,0 +1,8 @@
|
||||
# Context for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
|
||||
Run manually to sync roster.
|
||||
Executing prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
@@ -0,0 +1,17 @@
|
||||
# Context
|
||||
- Agent: changelog-agent
|
||||
- Cadence: weekly
|
||||
- Session: 2026-02-17T05-04-24Z
|
||||
- Prompt Path: src/prompts/weekly/changelog-agent.md
|
||||
|
||||
## Goal
|
||||
Update changelog and create release draft.
|
||||
|
||||
## Scope
|
||||
- Analyze git log for the last 7 days.
|
||||
- Update CHANGELOG.md (if exists) or create releases/draft.
|
||||
- Create memory update.
|
||||
|
||||
## Constraints
|
||||
- Do not invent PR numbers.
|
||||
- Follow AGENTS.md/CLAUDE.md policies.
|
||||
@@ -0,0 +1,19 @@
|
||||
# Context for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
|
||||
## Goal
|
||||
Sync scheduler roster with actual files.
|
||||
|
||||
## Scope
|
||||
- src/prompts/daily/
|
||||
- src/prompts/weekly/
|
||||
- roster.json
|
||||
- scheduler markdown files
|
||||
- Active Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
## Constraints
|
||||
- Do not create/delete prompt files.
|
||||
- Follow roster.json as source of truth.
|
||||
@@ -0,0 +1,16 @@
|
||||
# DECISIONS: perf-agent (2026-02-16)
|
||||
|
||||
## Decision: Visibility Gating for Dashboard Refresh Loop
|
||||
|
||||
- **Decision**: Modify the `setInterval` in `dashboard/index.html` to skip rendering if `document.hidden` is true.
|
||||
- **Rationale**: The dashboard currently re-renders the DOM every 30 seconds to update TTL bars, even when the tab is in the background. This wastes CPU cycles.
|
||||
- **Consequences**:
|
||||
- Reduced CPU usage when tab is hidden.
|
||||
- UI might be slightly stale when tab becomes visible, so we add a `visibilitychange` listener to force an immediate update.
|
||||
|
||||
## Alternatives Considered
|
||||
- Remove the interval entirely: Would stop updates.
|
||||
- Use `requestAnimationFrame`: Still runs (sometimes throttled) and more complex to manage with 30s intervals.
|
||||
|
||||
## Follow-ups
|
||||
- Monitor if users complain about stale data (should be mitigated by `visibilitychange`).
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-17T00-00-00Z
|
||||
prompt: src/prompts/daily/perf-agent.md
|
||||
---
|
||||
# Decisions
|
||||
|
||||
**Decision**: Use grep for pattern matching.
|
||||
**Rationale**: Efficient for identifying target keywords.
|
||||
|
||||
References: src/prompts/daily/perf-agent.md
|
||||
@@ -0,0 +1,4 @@
|
||||
# Decisions for Scheduler Update Agent
|
||||
|
||||
- Synced roster.json with actual file system state.
|
||||
- Updated daily-scheduler.md and weekly-scheduler.md to match roster.json.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Decisions for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
## Decision: Sync Roster
|
||||
**Rationale**: Files on disk did not match roster.json.
|
||||
@@ -0,0 +1,8 @@
|
||||
# Decisions
|
||||
- Agent: changelog-agent
|
||||
- Cadence: weekly
|
||||
- Session: 2026-02-17T05-04-24Z
|
||||
- Prompt Path: src/prompts/weekly/changelog-agent.md
|
||||
|
||||
## Decision: Use git log
|
||||
- Rationale: Git log is the source of truth for changes.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Decisions for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
## Decision: Sync Roster
|
||||
**Rationale**: Files on disk did not match roster.json.
|
||||
+3
-2
@@ -24,7 +24,7 @@ const EVOLVING_DIRS = ['daily', 'weekly'];
|
||||
|
||||
// New constants for full application install
|
||||
const APP_DIRS = ['src', 'bin', 'dashboard', 'landing', 'assets', 'scripts'];
|
||||
const APP_FILES = ['package.json', 'build.mjs', 'README.md', 'torch-config.example.json'];
|
||||
const APP_FILES = ['package.json', 'build.mjs', 'README.md', 'torch-config.example.json', 'TORCH.md'];
|
||||
|
||||
function getPaths(root, installDirName) {
|
||||
const torchDir = path.resolve(root, installDirName);
|
||||
@@ -65,7 +65,8 @@ function transformContent(content, installDirName) {
|
||||
.replace(/src\/prompts\/daily\//g, `${prefix}prompts/daily/`)
|
||||
.replace(/src\/prompts\/weekly\//g, `${prefix}prompts/weekly/`)
|
||||
.replace(/src\/prompts\/roster\.json/g, `${prefix}roster.json`)
|
||||
.replace(/src\/prompts\/scheduler-flow\.md/g, `${prefix}scheduler-flow.md`);
|
||||
.replace(/src\/prompts\/scheduler-flow\.md/g, `${prefix}scheduler-flow.md`)
|
||||
.replace(/TORCH\.md/g, `${prefix}TORCH.md`);
|
||||
}
|
||||
|
||||
function copyFile(src, dest, transform = false, overwrite = true, installDirName = 'torch') {
|
||||
|
||||
@@ -27,7 +27,7 @@ Use `excluded` from the JSON output as the canonical exclusion set.
|
||||
If `excluded` is unavailable, fallback to the union of `locked`, `paused`, and `completed`.
|
||||
|
||||
MUST 3: Run these commands in this order:
|
||||
1) test -f AGENTS.md && cat AGENTS.md || echo "No AGENTS.md found; continuing" (missing AGENTS.md is non-fatal)
|
||||
1) test -f TORCH.md && cat TORCH.md || echo "No TORCH.md found; continuing" (missing TORCH.md is non-fatal)
|
||||
2) mkdir -p task-logs/daily task-logs/weekly
|
||||
3) ls -1 task-logs/daily/ | sort | tail -n 1
|
||||
4) Select next roster agent using this exact algorithm:
|
||||
@@ -111,7 +111,7 @@ Use `excluded` from the JSON output as the canonical exclusion set.
|
||||
If `excluded` is unavailable, fallback to the union of `locked`, `paused`, and `completed`.
|
||||
|
||||
MUST 3: Run these commands in this order:
|
||||
1) test -f AGENTS.md && cat AGENTS.md || echo "No AGENTS.md found; continuing" (missing AGENTS.md is non-fatal)
|
||||
1) test -f TORCH.md && cat TORCH.md || echo "No TORCH.md found; continuing" (missing TORCH.md is non-fatal)
|
||||
2) mkdir -p task-logs/daily task-logs/weekly
|
||||
3) ls -1 task-logs/weekly/ | sort | tail -n 1
|
||||
4) Select next roster agent using this exact algorithm:
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
"perf-deepdive-agent",
|
||||
"perf-optimization-agent",
|
||||
"pr-review-agent",
|
||||
"prompt-maintenance-agent",
|
||||
"prompt-safety-agent",
|
||||
"prompt-fixer-agent",
|
||||
"prompt-gap-analysis-agent",
|
||||
"prompt-maintenance-agent",
|
||||
"prompt-safety-agent",
|
||||
"race-condition-agent",
|
||||
"refactor-agent",
|
||||
"repo-fit-agent",
|
||||
@@ -46,4 +46,4 @@
|
||||
"ui-ux-agent",
|
||||
"weekly-synthesis-agent"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,7 @@ Prompt authors: do not use legacy unprefixed paths (`context/`, `todo/`, `decisi
|
||||
Every agent prompt invoked by the schedulers (daily/weekly) MUST enforce this contract:
|
||||
|
||||
1. **Read baseline policy files before implementation**:
|
||||
- `AGENTS.md`
|
||||
- `CLAUDE.md`
|
||||
- `TORCH.md`
|
||||
- `KNOWN_ISSUES.md`
|
||||
- Canonical path note: active issues are tracked in root `KNOWN_ISSUES.md` (not `docs/KNOWN_ISSUES.md`)
|
||||
- `docs/agent-handoffs/README.md`
|
||||
@@ -36,9 +35,13 @@ Every agent prompt invoked by the schedulers (daily/weekly) MUST enforce this co
|
||||
- Retrieval command MUST write cadence-scoped evidence artifacts:
|
||||
- `.scheduler-memory/retrieve-<cadence>.ok`
|
||||
- `.scheduler-memory/retrieve-<cadence>.json` containing operation inputs/outputs (`agentId`, `query`, seeded event count, ingested count, retrieved count).
|
||||
- **Agent Action**: Review `.scheduler-memory/latest/<cadence>/memories.md` for relevant context.
|
||||
|
||||
5. **Store memory after implementation and before completion publish**:
|
||||
- **Agent Action**: Write any new insights, learnings, or patterns to `memory-update.md`.
|
||||
- Run configured memory storage workflow after prompt execution (for example via `scheduler.memoryPolicyByCadence.<cadence>.storeCommand`)
|
||||
- Storage command MUST call real memory services (`src/services/memory/index.js#ingestEvents`, which uses ingestor/summarizer pipeline) and MUST emit deterministic marker `MEMORY_STORED`.
|
||||
- Storage command MUST ingest content from `memory-update.md` if present.
|
||||
- Storage command MUST write cadence-scoped evidence artifacts:
|
||||
- `.scheduler-memory/store-<cadence>.ok`
|
||||
- `.scheduler-memory/store-<cadence>.json` containing operation inputs/outputs (`agentId`, input event count, stored count, generated summaries).
|
||||
@@ -68,10 +71,10 @@ Every agent prompt invoked by the schedulers (daily/weekly) MUST enforce this co
|
||||
|
||||
Goose Desktop note: `npm run lock:check:<cadence>` can emit large hermit wrapper logs. Use `--json --quiet` (as documented above). If the command still fails due to Goose hermit issues, apply the PATH workaround in `KNOWN_ISSUES.md` before rerunning.
|
||||
|
||||
3. Read policy file(s) once before the run loop. This step is conditional: if `AGENTS.md` is missing, continue without failing.
|
||||
3. Read policy file(s) once before the run loop. This step is conditional: if `TORCH.md` is missing, continue without failing.
|
||||
|
||||
```bash
|
||||
test -f AGENTS.md && cat AGENTS.md || echo "No AGENTS.md found; continuing"
|
||||
test -f TORCH.md && cat TORCH.md || echo "No TORCH.md found; continuing"
|
||||
```
|
||||
|
||||
4. Bootstrap log directories before listing files:
|
||||
|
||||
@@ -33,10 +33,10 @@ Canonical roster source: `src/prompts/roster.json` (`weekly` key).
|
||||
| 7 | perf-deepdive-agent | `perf-deepdive-agent.md` |
|
||||
| 8 | perf-optimization-agent | `perf-optimization-agent.md` |
|
||||
| 9 | pr-review-agent | `pr-review-agent.md` |
|
||||
| 10 | prompt-maintenance-agent | `prompt-maintenance-agent.md` |
|
||||
| 11 | prompt-safety-agent | `prompt-safety-agent.md` |
|
||||
| 12 | prompt-fixer-agent | `prompt-fixer-agent.md` |
|
||||
| 13 | prompt-gap-analysis-agent | `prompt-gap-analysis-agent.md` |
|
||||
| 10 | prompt-fixer-agent | `prompt-fixer-agent.md` |
|
||||
| 11 | prompt-gap-analysis-agent | `prompt-gap-analysis-agent.md` |
|
||||
| 12 | prompt-maintenance-agent | `prompt-maintenance-agent.md` |
|
||||
| 13 | prompt-safety-agent | `prompt-safety-agent.md` |
|
||||
| 14 | race-condition-agent | `race-condition-agent.md` |
|
||||
| 15 | refactor-agent | `refactor-agent.md` |
|
||||
| 16 | repo-fit-agent | `repo-fit-agent.md` |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# TEST LOG: perf-agent (2026-02-16)
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. **Static Analysis**: Verify `dashboard/index.html` contains `document.hidden` check inside `setInterval`.
|
||||
2. **Static Analysis**: Verify `dashboard/index.html` contains `document.addEventListener('visibilitychange', ...)` handler.
|
||||
3. **Linting**: Run `npm run lint` to ensure no syntax errors or style violations.
|
||||
|
||||
## Results
|
||||
|
||||
- [x] Static Analysis (Hidden Check): Passed (Verified in `dashboard/index.html`)
|
||||
- [x] Static Analysis (Visibility Listener): Passed (Verified in `dashboard/index.html`)
|
||||
- [ ] Linting: Scheduled for Scheduler Completion step.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-17T00-00-00Z
|
||||
prompt: src/prompts/daily/perf-agent.md
|
||||
---
|
||||
# Test Log
|
||||
|
||||
- Command: grep -rE "setInterval|setTimeout" src/
|
||||
- Result: Pattern search completed.
|
||||
|
||||
References: src/prompts/daily/perf-agent.md
|
||||
@@ -0,0 +1,6 @@
|
||||
# Test Log for Scheduler Update Agent
|
||||
|
||||
- Command: node scripts/temp-scheduler-update.mjs
|
||||
- Result: Success
|
||||
- Command: npm run lint
|
||||
- Result: Success
|
||||
@@ -0,0 +1,11 @@
|
||||
# Test Log for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
- Command: node scripts/temp-scheduler-update.mjs
|
||||
- Result: Success
|
||||
- Command: npm run lint
|
||||
- Result: Success
|
||||
@@ -0,0 +1,14 @@
|
||||
# Test Log
|
||||
- Agent: changelog-agent
|
||||
- Cadence: weekly
|
||||
- Session: 2026-02-17T05-04-24Z
|
||||
- Prompt Path: src/prompts/weekly/changelog-agent.md
|
||||
|
||||
## Log
|
||||
- Command: echo "Starting run"
|
||||
- Result: Starting run
|
||||
|
||||
- Command: git log --all --since='7 days ago' ...
|
||||
- Result: Retrieved 212 commits
|
||||
- Command: python3 generate_changelog.py
|
||||
- Result: Created releases/draft-2026-02-17.md
|
||||
@@ -0,0 +1,11 @@
|
||||
# Test Log for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
- Command: node scripts/temp-scheduler-update.mjs
|
||||
- Result: Success
|
||||
- Command: npm run lint
|
||||
- Result: Success
|
||||
@@ -0,0 +1,10 @@
|
||||
# TODO: perf-agent (2026-02-16)
|
||||
|
||||
- [ ] Create context file.
|
||||
- [ ] Run grep searches.
|
||||
- [ ] Create hits file.
|
||||
- [ ] Implement visibility gating in `dashboard/index.html`.
|
||||
- [ ] Document decisions.
|
||||
- [ ] Create test logs.
|
||||
- [ ] Create daily report.
|
||||
- [ ] Commit and push.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-17T00-00-00Z
|
||||
prompt: src/prompts/daily/perf-agent.md
|
||||
---
|
||||
# Tasks
|
||||
|
||||
## Pending Tasks
|
||||
- [x] Analyze search results
|
||||
|
||||
## Completed Tasks
|
||||
- [x] Run search patterns
|
||||
|
||||
References: src/prompts/daily/perf-agent.md
|
||||
@@ -0,0 +1,5 @@
|
||||
# TODO for Scheduler Update Agent
|
||||
|
||||
- [x] Scan prompt directories
|
||||
- [x] Update roster.json
|
||||
- [x] Update scheduler markdown tables
|
||||
@@ -0,0 +1,10 @@
|
||||
# TODO for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
- [x] Scan prompt directories
|
||||
- [x] Update roster.json
|
||||
- [x] Update scheduler markdown tables
|
||||
@@ -0,0 +1,15 @@
|
||||
# Todo
|
||||
- Agent: changelog-agent
|
||||
- Cadence: weekly
|
||||
- Session: 2026-02-17T05-04-24Z
|
||||
- Prompt Path: src/prompts/weekly/changelog-agent.md
|
||||
|
||||
## Pending Tasks
|
||||
- [x] Read git log
|
||||
- [x] Classify changes
|
||||
- [x] Create release draft
|
||||
- [x] Create memory update
|
||||
|
||||
## Completed Tasks
|
||||
- Generated changelog draft
|
||||
- Updated artifacts
|
||||
@@ -0,0 +1,14 @@
|
||||
# TODO for Scheduler Update Agent
|
||||
|
||||
**Agent**: scheduler-update-agent
|
||||
**Cadence**: daily
|
||||
**Session**: manual-jules-1771293773
|
||||
Prompt: src/prompts/daily/scheduler-update-agent.md
|
||||
|
||||
## Pending Tasks
|
||||
- None
|
||||
|
||||
## Completed Tasks
|
||||
- [x] Scan prompt directories
|
||||
- [x] Update roster.json
|
||||
- [x] Update scheduler markdown tables
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
cadence: daily
|
||||
agent: log-fixer-agent
|
||||
status: completed
|
||||
reason: 'Scheduler cycle completed successfully'
|
||||
detail: 'Fixed prompt schema errors in innerhtml-migration-agent.md, known-issues-agent.md, and deps-security-agent.md'
|
||||
created_at: 2026-02-16T19:06:25Z
|
||||
timestamp: 2026-02-16T19:06:25Z
|
||||
platform: 'jules'
|
||||
---
|
||||
|
||||
# Scheduler completed
|
||||
|
||||
- reason: Scheduler cycle completed successfully
|
||||
- detail: Fixed prompt schema errors in innerhtml-migration-agent.md, known-issues-agent.md, and deps-security-agent.md
|
||||
- platform: jules
|
||||
- actions:
|
||||
- Added header to `src/prompts/daily/innerhtml-migration-agent.md`
|
||||
- Added header to `src/prompts/daily/known-issues-agent.md`
|
||||
- Added header to `src/prompts/daily/deps-security-agent.md`
|
||||
@@ -0,0 +1,18 @@
|
||||
# Agent: onboarding-audit-agent
|
||||
# Status: completed
|
||||
|
||||
## Output
|
||||
- Ran onboarding audit.
|
||||
- Confirmed `npm ci` and `npm run build` pass.
|
||||
- `npm test` timed out after 400s; investigated and created incident report.
|
||||
- `npm run lint` passed with warnings.
|
||||
- Updated `KNOWN_ISSUES.md` with `npm test` timeout issue.
|
||||
- Created `artifacts/onboarding-audit-agent/report.md`.
|
||||
- Created `docs/agent-handoffs/incidents/2026-02-16-npm-test-timeout.md`.
|
||||
|
||||
## Artifacts
|
||||
- `artifacts/onboarding-audit-agent/report.md`
|
||||
- `docs/agent-handoffs/incidents/2026-02-16-npm-test-timeout.md`
|
||||
|
||||
## Next Steps
|
||||
- Investigate `npm test` timeout in full suite context.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
status: completed
|
||||
date: 2026-02-16
|
||||
---
|
||||
|
||||
# perf-agent completed
|
||||
|
||||
- **PR**: `perf: visibility-gate dashboard render loop`
|
||||
- **Artifacts**:
|
||||
- `src/context/CONTEXT_2026-02-16.md`
|
||||
- `src/todo/TODO_2026-02-16.md`
|
||||
- `src/decisions/DECISIONS_2026-02-16.md`
|
||||
- `src/test_logs/TEST_LOG_2026-02-16.md`
|
||||
- `daily-perf-report-2026-02-16.md`
|
||||
- `perf/hits-2026-02-16.json`
|
||||
- **Summary**:
|
||||
- Found and fixed a P1 issue in `dashboard/index.html` where the render loop ran unnecessarily when the tab was hidden.
|
||||
- Added visibility gating and a `visibilitychange` listener.
|
||||
- Verified changes with static analysis.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
agent: perf-agent
|
||||
platform: jules
|
||||
---
|
||||
Completed successfully.
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
agent: protocol-research-agent
|
||||
status: completed
|
||||
date: 2026-02-17
|
||||
platform: jules
|
||||
---
|
||||
|
||||
# Daily Task: Protocol Research
|
||||
|
||||
**Agent:** protocol-research-agent
|
||||
**Date:** 2026-02-17
|
||||
**Status:** Completed
|
||||
|
||||
## Summary
|
||||
- Scanned codebase for protocol usage (Nostr, HTTP, WebSocket).
|
||||
- Updated `PROTOCOL_INVENTORY.md` with:
|
||||
- NIP-40 (Expiration) compliance.
|
||||
- NIP-78 (App Data) compliance.
|
||||
- HTTP/WebSocket usage details.
|
||||
- Custom Kind 27235 (Relay Health Probe) documentation.
|
||||
- Created `protocol-report-2026-02-17.md` with detailed findings.
|
||||
- Verified system health via unit tests (`test/lock-ops.test.mjs`, `test/relay-health-thresholds.test.mjs`).
|
||||
- Performed memory retrieval and storage cycles.
|
||||
|
||||
## Artifacts
|
||||
- `PROTOCOL_INVENTORY.md` (Updated)
|
||||
- `protocol-report-2026-02-17.md` (Created)
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
agent: scheduler-update-agent
|
||||
status: completed
|
||||
cadence: daily
|
||||
platform: jules
|
||||
---
|
||||
|
||||
Successfully synced roster.json and scheduler markdown files.
|
||||
@@ -0,0 +1,22 @@
|
||||
# Agent Run: style-agent
|
||||
|
||||
- **Date:** 2026-02-17T04-05-59Z
|
||||
- **Cadence:** daily
|
||||
- **Platform:** jules
|
||||
- **Status:** completed
|
||||
|
||||
## Steps
|
||||
1. Lock acquired.
|
||||
2. Memory retrieved.
|
||||
3. Dependencies installed.
|
||||
4. Lint checked (passed with warnings, no errors).
|
||||
5. Auto-fixes skipped (not needed).
|
||||
6. Lint verification passed.
|
||||
7. Memory stored.
|
||||
8. Scheduler validation passed.
|
||||
9. Completion published.
|
||||
|
||||
## Results
|
||||
- Lint passed.
|
||||
- No changes made to codebase.
|
||||
- Memory updated.
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
agent: bug-reproducer-agent
|
||||
status: completed
|
||||
date: 2026-02-17
|
||||
---
|
||||
|
||||
# Bug Reproducer Agent - Completed
|
||||
|
||||
Reproduced `npm test` timeout issue.
|
||||
Created reproduction artifacts in `artifacts/reproducers/npm-test-timeout/`.
|
||||
|
||||
## Artifacts
|
||||
- Script: `artifacts/reproducers/npm-test-timeout/repro.sh`
|
||||
- README: `artifacts/reproducers/npm-test-timeout/README.md`
|
||||
- Log: `artifacts/reproducers/npm-test-timeout/npm_test_output.log`
|
||||
|
||||
## Memory
|
||||
- Retrieval: `.scheduler-memory/latest/weekly/retrieve.ok`
|
||||
- Storage: `.scheduler-memory/latest/weekly/store.ok`
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
agent: changelog-agent
|
||||
status: completed
|
||||
date: 2026-02-17
|
||||
platform: jules
|
||||
---
|
||||
|
||||
# Changelog Agent - Completed
|
||||
|
||||
Executed changelog generation for the week.
|
||||
|
||||
## Artifacts
|
||||
- Changelog: `releases/draft-2026-02-17.md`
|
||||
- Context: `src/context/CONTEXT_2026-02-17T05-04-24Z.md`
|
||||
- Todo: `src/todo/TODO_2026-02-17T05-04-24Z.md`
|
||||
- Decisions: `src/decisions/DECISIONS_2026-02-17T05-04-24Z.md`
|
||||
- Test Log: `src/test_logs/TEST_LOG_2026-02-17T05-04-24Z.md`
|
||||
|
||||
## Memory
|
||||
- Retrieval: `.scheduler-memory/latest/weekly/retrieve.ok`
|
||||
- Storage: `.scheduler-memory/latest/weekly/store.ok`
|
||||
@@ -0,0 +1,34 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
|
||||
const DIST_DIR = path.resolve('dist');
|
||||
|
||||
test('Build artifacts verification', async (t) => {
|
||||
await t.test('dist directory exists', () => {
|
||||
assert.strictEqual(fs.existsSync(DIST_DIR), true, 'dist directory should exist');
|
||||
});
|
||||
|
||||
await t.test('Critical files exist in dist', () => {
|
||||
const criticalFiles = [
|
||||
'index.html',
|
||||
'dashboard/index.html',
|
||||
'src/docs/TORCH.md',
|
||||
'assets/logo.svg',
|
||||
'src/constants.mjs',
|
||||
'src/prompts/META_PROMPTS.md'
|
||||
];
|
||||
|
||||
criticalFiles.forEach(file => {
|
||||
const filePath = path.join(DIST_DIR, file);
|
||||
assert.strictEqual(fs.existsSync(filePath), true, `File ${file} should exist in dist`);
|
||||
});
|
||||
});
|
||||
|
||||
await t.test('TORCH.md content is not empty', () => {
|
||||
const torchMdPath = path.join(DIST_DIR, 'src/docs/TORCH.md');
|
||||
const content = fs.readFileSync(torchMdPath, 'utf8');
|
||||
assert.ok(content.length > 0, 'TORCH.md should not be empty');
|
||||
});
|
||||
});
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 140 KiB |
@@ -1,24 +0,0 @@
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
def verify_dashboard():
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
page = browser.new_page()
|
||||
try:
|
||||
page.goto("http://localhost:4173/dashboard/")
|
||||
# Wait for title
|
||||
page.wait_for_selector("h1:has-text('TORCH Agent Dashboard')")
|
||||
# Wait a bit for JS to run and potentially render the summary bar
|
||||
page.wait_for_timeout(3000)
|
||||
|
||||
# Take screenshot
|
||||
page.screenshot(path="verification/dashboard.png")
|
||||
print("Screenshot saved to verification/dashboard.png")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
verify_dashboard()
|
||||
@@ -1,37 +0,0 @@
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
def run():
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
page = browser.new_page()
|
||||
|
||||
# Navigate to dashboard
|
||||
print("Navigating to dashboard...")
|
||||
page.goto("http://localhost:8081/dashboard/index.html")
|
||||
|
||||
# Click the TORCH link
|
||||
print("Clicking TORCH link...")
|
||||
page.click("#openDocs")
|
||||
|
||||
# Wait for modal to be visible and content to load
|
||||
print("Waiting for modal...")
|
||||
page.wait_for_selector("#docsModal.show")
|
||||
|
||||
# Wait for markdown content to be rendered (look for h1)
|
||||
page.wait_for_selector("#markdown-content h1")
|
||||
|
||||
# Take screenshot
|
||||
print("Taking screenshot...")
|
||||
page.screenshot(path="verification/dashboard_modal.png")
|
||||
|
||||
# Verify content
|
||||
content = page.inner_text("#markdown-content")
|
||||
if "Task Orchestration via Relay-Coordinated Handoff" in content:
|
||||
print("SUCCESS: Modal content verified.")
|
||||
else:
|
||||
print("FAILURE: Modal content not found.")
|
||||
|
||||
browser.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
Reference in new issue
Block a user