12 Commits

Author SHA1 Message Date
63ab144c8f sync: Auto-sync from Mikes-MacBook-Air.local at 2026-01-22 19:10:48
Synced files:
- DOS batch files updated (ATESYNC, CTONWTXT, DEPLOY, NWTOC, etc.)
- New debug batch files (ATESYNCD, CTONWD, NWTOCD, DIAGBK)
- Removed obsolete debug files (ATESYNC-DEBUG, CTONW-DEBUG, NWTOC-DEBUG)
- New deployment scripts (deploy-to-nas.sh, validate-dos.sh)
- DOS coding agent documentation updated

Machine: Mikes-MacBook-Air.local
Timestamp: 2026-01-22 19:10:48

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:11:08 -07:00
502111875d feat(dataforth-dos): Add Video Analysis Agent and debug batch files
Video Analysis Agent (.claude/agents/video-analysis.md):
- Frame extraction with ffmpeg
- DOS console text recognition
- Boot sequence documentation
- Integration with Photo Agent and DOS Coding Agent

Debug batch files for video recording:
- ATESYNC-DEBUG.BAT: Orchestrator with PAUSE at each step
- CTONW-DEBUG.BAT: Upload with 10 step-by-step pauses
- NWTOC-DEBUG.BAT: Download with 11 step-by-step pauses

Each step clearly labeled with ECHO for video analysis.
Run ATESYNC-DEBUG TS-3R to capture boot process.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:13:00 -07:00
c6815a20ba feat(dataforth-dos): Add DOS 6.22 Coding Agent and fix all batch files
DOS 6.22 Coding Agent (.claude/agents/dos-coding.md):
- 18 documented compatibility rules
- Validation checklist for all DOS batch files
- Known working constructs reference
- Error message troubleshooting guide

Batch file fixes for DOS 6.22 compatibility:
- CTONW.BAT v3.2: Removed %DATE%/%TIME%, square brackets
- ATESYNC.BAT v1.1: Removed square brackets, ERRORLEVEL checks
- CHECKUPD.BAT v1.4: Removed CALL :label subroutines, square brackets
- UPDATE.BAT v2.4: Removed square brackets, fixed NUL directory checks
- DOSTEST.BAT v1.2: Removed 2>NUL, square brackets, NUL checks

Key DOS 6.22 incompatibilities fixed:
- CALL :label (Windows NT+ only)
- %DATE% and %TIME% variables (don't exist)
- Square brackets in ECHO (cause errors)
- 2>NUL stderr redirect (not supported)
- IF NOT EXIST path\NUL (unreliable)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 16:57:46 -07:00
88539c8897 feat(dataforth-dos): Add ATESYNC orchestrator and CTONW upload fix
ATESYNC.BAT v1.0:
- Boot-time orchestrator (ARCHBAT equivalent from TS-27)
- Calls CTONW (upload) then NWTOC (download)
- Creates machine folder structure if missing
- Accepts machine name as parameter or MACHINE env var

CTONW.BAT v3.1:
- Fixed upload path: now uploads to T:\%MACHINE%\LOGS\*LOG
- Added safeguards to prevent data overwriting:
  - Refuses to run if MACHINE not set
  - Refuses to run if T:\%MACHINE% folder missing
- Logs machine name, date/time, target path
- Uploads all 8 LOG folders plus Reports

Based on analysis of TS-27 golden example machine backup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 16:43:38 -07:00
e4392afce9 docs: Document Dataforth test database system and troubleshooting
Investigation and Documentation:
- Discovered and documented test database system on AD2 server
- Created comprehensive TEST_DATABASE_ARCHITECTURE.md with full system details
- Retrieved all key database files from AD2 (import.js, schema.sql, server configs)
- Documented data flow: DOS machines → NAS → AD2 → SQLite → Web interface
- Verified database health: 1,027,517 records, 1075 MB, dates back to 1990

Database System Architecture:
- SQLite database with Node.js/Express.js web server (port 3000)
- Automated import via Sync-FromNAS.ps1 (runs every 15 minutes)
- 8 log types supported: DSCLOG, 5BLOG, 7BLOG, 8BLOG, PWRLOG, SCTLOG, VASLOG, SHT
- FTS5 full-text search, comprehensive indexes for performance
- API endpoints: search, stats, export, datasheet generation

Troubleshooting Scripts Created:
- Database diagnostics: check-db-simple.ps1, test-db-directly.ps1
- Server status checks: check-node-running.ps1, check-db-server.ps1
- Performance analysis: check-db-performance.ps1, check-wal-files.ps1
- API testing: test-api-endpoint.ps1, test-query.js
- Import monitoring: check-new-records.ps1
- Database optimization attempts: api-js-optimized.js, api-js-fixed.js
- Deployment scripts: deploy-db-optimization.ps1, deploy-db-fix.ps1, restore-original.ps1

Key Findings:
- Database file healthy and queryable (verified with test-query.js)
- Node.js server not running (port 3000 closed) - root cause of web interface issues
- Database last updated 8 days ago (01/13/2026) - automated sync may be broken
- Attempted performance optimizations (WAL mode) incompatible with readonly connections
- Original api.js restored from backup after optimization conflicts

Retrieved Documentation:
- QUICKSTART-retrieved.md: Quick start guide for database server
- SESSION_NOTES-retrieved.md: Complete session notes from database creation
- Sync-FromNAS-retrieved.ps1: Full sync script with database import logic
- import-js-retrieved.js: Node.js import script (12,774 bytes)
- schema-retrieved.sql: SQLite schema with FTS5 triggers
- server-js-retrieved.js: Express.js server configuration
- api-js-retrieved.js: API routes and endpoints
- package-retrieved.json: Node.js dependencies

Action Items Identified:
1. Start Node.js server on AD2 to restore web interface functionality
2. Investigate why automated sync hasn't updated database in 8 days
3. Check Windows Task Scheduler for Sync-FromNAS.ps1 scheduled task
4. Run manual import to catch up on 8 days of test data if needed

Technical Details:
- Database path: C:\Shares\testdatadb\database\testdata.db
- Web interface: http://192.168.0.6:3000 (when running)
- Database size: 1075.14 MB (1,127,362,560 bytes)
- Total records: 1,027,517 (slight variance from original 1,030,940)
- Pass rate: 99.82% (1,029,046 passed, 1,888 failed)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 16:38:54 -07:00
7dc27290fb docs: Session log - DSCDATA sync fix and batch file updates 2026-01-21 13:46:18 -07:00
fd24a0c548 fix(dataforth-dos): DOS 6.22 batch file improvements and sync fix
NWTOC.BAT v3.5:
- Switch from XCOPY to COPY (more reliable in DOS 6.22)
- Remove all >NUL redirects that cause issues
- Add IF NOT EXIST checks before MD to avoid errors
- Add 8 ATE data folder copies (5BDATA, 7BDATA, 8BDATA, DSCDATA,
  HVDATA, PWRDATA, RMSDATA, SCTDATA)
- Remove machine-specific section (no longer needed)
- Remove MACHINE variable requirement

DEPLOY.BAT v2.4:
- Switch all XCOPY to COPY for DOS 6.22 compatibility
- Simplify output messages

Also fixed AD2->NAS sync issue:
- Ate/ProdSW folder was not being synced to NAS
- DOS machines were getting outdated DSCDATA files (Dec 2025 vs Jan 2026)
- Updated Sync-FromNAS.ps1 on AD2 to include Ate/ProdSW folder
- Manually synced correct files to NAS (DSCMAIN4.DAT 65508 bytes)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:44:09 -07:00
bc103bd888 docs: Update dataforth-dos session log
Session log updates for 2026-01-20 with additional work documentation.

This checkpoint also marks completion of GuruRMM security remediation:
- Phase 1: 10 critical security fixes deployed
- Phase 2: 8 major fixes deployed
- Production server updated at 172.16.3.30
- Gitea tracking issue #1 updated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:39:37 -07:00
6d3271c144 fix: DOS 6.22 compatibility - remove 2>NUL, add XCOPY /I flag
DOS 6.22 does not support stderr redirection (2>NUL), only stdout (>NUL).
Added /I flag to XCOPY to assume destination is directory.
Added CD \ATE and menux to AUTOEXEC.BAT generation.

Changes:
- CTONW.BAT v2.5: Removed 2>NUL from MD commands, added /I to XCOPY
- NWTOC.BAT v2.8: Removed 2>NUL from MD commands, added /I to XCOPY
- DEPLOY.BAT v2.3: Removed 2>NUL, added CD \ATE and menux to AUTOEXEC

Tested successfully on TS-4R and TS-3R DOS machines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 18:04:24 -07:00
d979fd81c1 fix: DOS 6.22 batch file compatibility - XCOPY /Y and simplified scripts
Major DOS 6.22 compatibility fixes for the Dataforth update system:

Changes Made:
- Replace COPY /Y with XCOPY /Y (COPY doesn't support /Y in DOS 6.22)
- Remove all trailing backslashes from XCOPY destinations (causes "Too many parameters")
- Remove %%~dpnF and %~nx1 syntax (Windows NT only, not DOS 6.22)
- Remove \NUL directory existence checks (unreliable in DOS 6.22)
- Simplify all batch files to minimal, reliable DOS 6.22 patterns
- Use MD >NUL 2>NUL for directory creation (ignore errors)

Files Updated:
- NWTOC.BAT v2.7: Simplified download with XCOPY /Y
- CTONW.BAT v2.4: Simplified upload with XCOPY /Y
- DEPLOY.BAT v2.2: Simplified deployment with XCOPY /Y
- CHECKUPD.BAT v1.3: Removed %~nx1 syntax
- UPDATE-ROOT.BAT: Root redirect script
- UPDATE-PRODSW.BAT v2.3: Backup utility (new file, was UPDATE.BAT in ProdSW)

Why:
- Previous versions caused infinite loops due to COPY /Y not existing in DOS 6.22
- Trailing backslashes on XCOPY destinations caused "Too many parameters" errors
- Complex variable syntax like %%~dpnF is NT-only and breaks on DOS 6.22
- Simplified scripts are more reliable and easier to debug

Testing:
- Deployed to AD2 (192.168.0.6) and D2TESTNAS (192.168.0.9)
- Ready for testing on TS-4R and TS-3R DOS machines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:45:47 -07:00
565b6458ba fix: Remove all emojis from documentation for cross-platform compliance
Replaced 50+ emoji types with ASCII text markers for consistent rendering
across all terminals, editors, and operating systems:

  - Checkmarks/status: [OK], [DONE], [SUCCESS], [PASS]
  - Errors/warnings: [ERROR], [FAIL], [WARNING], [CRITICAL]
  - Actions: [DO], [DO NOT], [REQUIRED], [OPTIONAL]
  - Navigation: [NEXT], [PREVIOUS], [TIP], [NOTE]
  - Progress: [IN PROGRESS], [PENDING], [BLOCKED]

Additional changes:
  - Made paths cross-platform (~/ClaudeTools for Mac/Linux)
  - Fixed database host references to 172.16.3.30
  - Updated START_HERE.md and CONTEXT_RECOVERY_PROMPT.md for multi-OS use

Files updated: 58 markdown files across:
  - .claude/ configuration and agents
  - docs/ documentation
  - projects/ project files
  - Root-level documentation

This enforces the NO EMOJIS rule from directives.md and ensures
documentation renders correctly on all systems.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 16:21:06 -07:00
4efceab2e3 Complete project organization: move all DOS files to projects/dataforth-dos, create client folders, update Claude config 2026-01-20 16:03:00 -07:00