Commit Graph

355 Commits

Author SHA1 Message Date
Lucas Berger 062e096cd4 docs(13-01): remove outdated DEPLOYMENT_GUIDE.md
- File written during Phase 10-05 for 3 sub-workflows (now 7)
- References 199 nodes (now 166 in main workflow)
- Fully superseded by DEPLOY-SUBWORKFLOWS.md (725 lines, current)
- README now links only to DEPLOY-SUBWORKFLOWS.md for technical details
- Remaining references in .planning/ are historical records (expected)
2026-02-08 18:56:44 -05:00
Lucas Berger 6cdb9581a1 docs(13-01): overhaul README with architecture, configuration, and troubleshooting sections
- Add dedicated Architecture section with ASCII diagram (main workflow + 7 sub-workflows)
- Add dedicated Configuration section (separated from installation steps)
- Add dedicated Troubleshooting section (5 common issues with fixes)
- Document batch selection workflow (toggle checkmarks, multi-select UI)
- Document inline keyboard Update All button location and usage
- Expand Usage section with inline keyboard and batch operations subsections
- Document infrastructure container exclusion from batch updates
- Link to DEPLOY-SUBWORKFLOWS.md for technical details
- Remove outdated DEPLOYMENT_GUIDE.md reference
- Expand from 139 to 264 lines (comprehensive, not over-documented)
2026-02-08 18:56:44 -05:00
Lucas Berger 70115f7cd6 docs(13): create phase plan 2026-02-08 18:56:44 -05:00
Lucas Berger 820dff47f4 docs(13): research documentation overhaul requirements and best practices 2026-02-08 18:56:44 -05:00
Lucas Berger afddb6130a docs(12-02): complete Phase 12 — all v1.2 requirements closed
BATCH-04 and BATCH-05 UAT passed. 9 bugs fixed during testing.
All 12 v1.2 requirements now complete. Phase 13 (docs overhaul) next.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger c2c2ce7092 fix(12-02): Update All flow — 9 bug fixes from UAT
Fixes discovered during BATCH-04/BATCH-05 UAT testing:

- Convert confirmation to HTTP Request (editMessageText for inline kb,
  sendMessage for text command) with dynamic endpoint selection
- Fix data chain breaks: use named node refs ($('Parse Callback Data'),
  $('Get Update All Data')) instead of $json after API calls
- Add infrastructure container exclusion (n8n, socket-proxy) by image
  and container name to prevent bot self-destruction during updates
- Add batch responseMode to update sub-workflow (skip Telegram messages)
- Reorder infra check before :latest filter so sha256-digest images
  appear in skipped list
- Add onError:continueRegularOutput to Answer Update All Start for
  expired callback queries
- Show "Back to List" button in batch summary for update-all flow
- Add Prepare Update All Batch fallback in Prepare Batch Loop

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger b3909f00e5 docs(12-01): complete documentation audit plan
- Create 12-01-SUMMARY.md with execution metrics and decisions
- Update STATE.md: Phase 12 complete (1/1 plan)
- Record decision: Document Unraid limitation vs programmatic fix
- Closed 4 requirements: ENV-01, ENV-02, DEBT-01, DEBT-02
- Resolved UNR-01 as documented limitation
- Duration: 140 seconds, 2 tasks completed, 3 files modified

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 7601e245a9 docs(12-01): document Unraid update badge limitation
- Add Known Limitations section to DEPLOY-SUBWORKFLOWS.md
- Document UNR-01: Unraid shows "apply update" after bot updates a container
- Explain root cause: bot bypasses Unraid's XML template system
- Provide workaround: click Apply Update in Unraid (instant, image cached)
- Clarify "Check for Updates" does NOT clear badge, may create new ones
- Mark UNR-01 as complete (documented limitation with workaround)
2026-02-08 18:56:44 -05:00
Lucas Berger e6e5df8754 docs(12-01): update environment and architecture documentation
- Update README to document docker-socket-proxy architecture instead of direct socket mount
- Clarify TELEGRAM_BOT_TOKEN needs both n8n credential AND env var
- Clarify user ID is hardcoded in IF nodes (no env var needed)
- Add missing commands to usage table (update all, /list)
- Document all 8 workflow files (main + 7 sub-workflows)
- Mark ENV-01, ENV-02, DEBT-01, DEBT-02 as complete in REQUIREMENTS.md
- Verify DEBT-02 is fixed (single --max-time 600 flag, no duplicates)
2026-02-08 18:56:44 -05:00
Lucas Berger 1ef726942a docs(12): plan phase with Unraid badge research and UAT
Research found Unraid badge issue is architectural (bot bypasses
Unraid's XML template system). Updated plans to document limitation
with workaround instead of attempting programmatic fix. Plan 01
covers docs/env/debt, Plan 02 covers deferred Update All UAT.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 510b7d50dc docs(12): create phase plan 2026-02-08 18:56:44 -05:00
Lucas Berger c1d988f0e7 docs(12): research phase domain 2026-02-08 18:56:44 -05:00
Lucas Berger 732f692544 docs(12): capture phase context 2026-02-08 18:56:44 -05:00
Lucas Berger 16ae0b8bc0 docs(quick-1-1): complete orphan node removal task 2026-02-08 18:56:44 -05:00
Lucas Berger d153453aa9 refactor(workflow): remove orphan callback node chain (172→166 nodes) 2026-02-08 18:56:44 -05:00
Lucas Berger db3df53800 docs(quick-1): create plan to remove orphan node chain 2026-02-08 18:56:44 -05:00
Lucas Berger a15df26b7b docs(phase-11): complete phase execution — bitmap encoding + Update All
Verification: 7/9 must-haves pass, 2 deferred (Update All UAT → Phase 12).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 642d1ec73d docs(11-02): complete plan — Update All button, deployment, UAT
UAT results: tests 1-3,6 pass (bitmap, long names, batch exec, regression).
Tests 4-5 (Update All UAT) deferred to after Phase 12.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 0810c0919a fix(11-01): fix bitmap node references to use Parse Callback Data
Is Bitmap Batch Stop and Resolve Batch Stop Names were checking $json.bitmap
which contains the Telegram API response, not the parsed callback data. Changed
both to reference $("Parse Callback Data").item.json directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 551a69f1f3 fix(11-01): fix batch stop bitmap resolution wiring and parser return
Three bugs from plan 11-01 execution:
1. Parse Callback Data bstop return missing bitmap/isBitmapBatchStop fields
2. Is Bitmap Batch Stop wired to expired branch [0] instead of not-expired [1]
3. Is Bitmap Batch Stop false branch went to Initialize Batch State, bypassing Prepare Batch Stop Exec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 3275e190c4 feat(11-02): add Update All button to container list with callback routing
- Add 'Update All :latest' button to Build Container List and Build Paginated List
- Add uall:start parser to Parse Callback Data (sets isUpdateAllStart flag)
- Add updateallstart rule to Route Callback (index 2)
- Add Answer Update All Start node with 'Checking for updates...' callback response
- Wire Route Callback [updateallstart] -> Answer Update All Start -> Get All Containers For Update All
- Fix Check Available Updates to support both text and callback origins (try/catch for Keyword Router vs Parse Callback Data)
2026-02-08 18:56:44 -05:00
Lucas Berger 339b366bcc docs(11-01): complete bitmap encoding plan -- unlimited container selection
- Created 11-01-SUMMARY.md with technical details and verification results
- Updated STATE.md: Phase 11 plan 1/2 complete, 50% progress
- Key metrics: 5m 16s duration, 2 tasks, 4 nodes added (1 batch-ui + 3 main workflow)
- Node counts: n8n-batch-ui.json 17 nodes, n8n-workflow.json 171 nodes
- Decisions: base36 BigInt encoding, graceful migration via dual parsers
2026-02-08 18:56:44 -05:00
Lucas Berger bac38634a3 feat(11-01): update main workflow for bitmap-encoded batch callbacks
- Add new parsers for b: (toggle), bn: (nav), be: (exec) formats in Parse Callback Data
- Update Prepare Batch UI Input to forward bitmap field instead of selectedCsv
- Retain old batch:toggle/nav/exec parsers for backward compatibility with in-flight messages
- Add bitmap detection in bstop:confirm parser (detects alphanumeric vs CSV format)
- Add 3 new nodes for bitmap resolution flow:
  - Is Bitmap Batch Stop (IF node)
  - Fetch Containers For Bitmap Stop (HTTP)
  - Resolve Batch Stop Names (Code node with decodeBitmap)
- Wire bitmap resolution flow: Check Batch Stop Expired -> Is Bitmap -> [true] Fetch -> Resolve -> Initialize
- Legacy CSV format routes directly to Initialize Batch State (false path)
- Total: 171 nodes (168 + 3 new)
2026-02-08 18:56:44 -05:00
Lucas Berger cea467f493 feat(11-01): implement bitmap encoding in batch UI sub-workflow
- Replace CSV-in-callback with base36 bitmap encoding
- Add Fetch Containers For Exec node for bitmap->name resolution
- Update all code nodes to use BigInt bitmap operations
- New callback formats: b:{page}:{bitmap}:{index}, bn:{bitmap}:{page}, be:{action}:{bitmap}
- Remove 64-byte limit check (bitmap encoding ~20 bytes max for 50 containers)
- Update trigger schema: selectedCsv -> bitmap, add containerIndex field
- Total: 17 nodes (16 original + 1 new)
2026-02-08 18:56:44 -05:00
Lucas Berger 1245aeed4f docs(11): create phase plan — bitmap batch selection + update all button 2026-02-08 18:56:44 -05:00
Lucas Berger 23ba84ae4e docs(11): research phase domain 2026-02-08 18:56:44 -05:00
Lucas Berger d2c44c0254 docs(phase-10.2): complete phase verification — all gaps closed 2026-02-08 18:56:44 -05:00
Lucas Berger dd30a899aa docs: add CLAUDE.md project instructions and debug analysis
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger f86ed83d00 docs(10.2-04): update UAT status - gaps 1-3 closed, gap 4 accepted
- Updated UAT status to gap-closure-complete
- Marked gaps 1-3 as closed by 10.2-04-PLAN.md
- Marked gap 4 as accepted (minor, no scope creep)
2026-02-08 18:56:44 -05:00
Lucas Berger 642162e0d3 docs(10.2-04): complete gap closure plan
- Created 10.2-04-SUMMARY.md with execution details
- Updated STATE.md: 4/4 plans complete, correlation IDs wired
- Documented UAT gaps 1-3 closed (gap 4 accepted as minor)
- Final state: 168 nodes, correlation IDs functional
2026-02-08 18:56:44 -05:00
Lucas Berger 43f525a89c fix(10.2-04): wire correlation ID generators and remove orphan nodes
- Renamed connection keys from node IDs to node names (Generate Correlation ID, Generate Callback Correlation ID)
- Rewired IF User Authenticated -> Generate Correlation ID -> Keyword Router
- Rewired IF Callback Authenticated -> Generate Callback Correlation ID -> Parse Callback Data
- Removed 2 orphan nodes (Delete Batch Confirm Message, Send Text Update Started)
- Removed ghost connection key (code-log-error)
- Node count reduced from 170 to 168
2026-02-08 18:56:44 -05:00
Lucas Berger 5434ef20d1 docs(10.2): create gap closure plan for correlation ID wiring 2026-02-08 18:56:44 -05:00
Lucas Berger c288fa1d39 test(10.2): complete UAT - 2 passed, 4 issues 2026-02-08 18:56:44 -05:00
Lucas Berger 03af26598f docs(phase-10.2): complete phase execution 2026-02-08 18:56:44 -05:00
Lucas Berger f620229cec docs(10.2-03): complete plan — scope reduction due to n8n static data limitation
- Created 10.2-03-SUMMARY.md documenting scope reduction and platform limitation
- Updated STATE.md: Phase 10.2 complete (3/3 plans)
- Documented critical finding: n8n static data does not persist between executions
- Final state: 170 nodes (168 baseline + 2 correlation ID generators)
- Correlation ID infrastructure and structured error returns retained
2026-02-08 18:56:44 -05:00
Lucas Berger 7f579d5fe9 refactor(10.2): remove static-data-dependent debug commands and logging nodes
n8n workflow static data does not persist between executions on this
instance, making the ring buffer, debug commands, and trace capture
non-functional. Removed:
- 4 Keyword Router debug rules (/errors, /clear, /debug, /trace)
- Process Debug Command + Send Debug Response nodes
- Log Error + Log Trace utility nodes
- 2 error detection IF nodes (Check Execute *Action Success)
- Inline trace blocks from 7 result-handling Code nodes

Kept: structured error returns in sub-workflows (success/false + error
objects), correlation ID generation, correlationId pass-through.

Node count: 176 -> 170.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 10ad20f495 fix(10.2-03): use JSON-serialized top-level key for n8n static data persistence
n8n $getWorkflowStaticData only reliably tracks top-level property changes.
Deep nested mutations (staticData.errorLog.debug.enabled = true) are not
persisted between executions. Fix: serialize errorLog as JSON string in
staticData._errorLog — every read does JSON.parse, every write does
JSON.stringify as a top-level assignment.

Fixed in: Process Debug Command, Log Error, Log Trace, 6 inline trace
nodes, Parse Callback Data callback routing trace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger e331d1618e fix(10.2-03): fix correlationId placement in 19 Prepare Input nodes
Plan 02 executor placed correlationId outside the json object in all
Prepare Input code nodes, creating "Unexpected token '}'" syntax errors.
Moved correlationId inside the json return object in all 19 affected nodes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 69eb4e0b9d fix(10.2-03): reorder Keyword Router rules — debug commands before generic contains
Two bugs: (1) connection array had old fallback at index [9] shifting debug
connections off-by-one, so /errors routed to Show Menu. (2) /debug status
matched rule 1 (contains "status") before rule 11 (startsWith /debug).
Fix: move startsWith debug rules [1-4] before contains rules [5-12].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger e7074288f0 feat(10.2-03): wire debug trace capture at sub-workflow boundaries and callback routing
- Added debug trace capture to 6 result-handling Code nodes
- Traces capture sub-workflow boundary data (success, action, hasError)
- Added callback routing trace to Parse Callback Data node
- Traces only activate when debug mode enabled (staticData.errorLog.debug.enabled)
- Auto-disable after 100 executions to prevent performance impact
- Inline tracing (no new nodes added, node count remains 176)
2026-02-08 18:56:44 -05:00
Lucas Berger 2ac0ba78bd docs(10.2-02): complete plan -- error propagation and correlation IDs
Summary:
- All 7 sub-workflows now return structured error objects
- Main workflow generates correlation IDs for request tracing
- Error detection active for 2 high-value paths
- 8 workflow JSON files modified (1 main + 7 sub-workflows)
- Main workflow: 172 -> 176 nodes (+4)
- Duration: 5.5 minutes
- Deviations: 2 (error detection scope reduced, logs trigger workaround)

STATE.md updates:
- Plan 2 of 3 complete (67% progress)
- Added achievements for 10.2-02
- Added 3 new decisions
- Updated next step to Plan 03
2026-02-08 18:56:44 -05:00
Lucas Berger f7130f61fc feat(10.2-02): add correlation ID generation and error capture to main workflow
Part A - Correlation ID Generation:
- Added Generate Correlation ID node for text command path
- Added Generate Callback Correlation ID node for callback path
- Wired between authentication and routing nodes
- Uses timestamp + random string pattern (no external dependencies)

Part B - Correlation ID Propagation:
- Modified 19 Prepare Input nodes to pass correlationId to sub-workflows
- Uses $input.item.json.correlationId pattern for flexibility
- Supports both text and callback paths

Part C - Error Capture Infrastructure:
- Added 2 error detection IF nodes for high-value paths:
  * Check Execute Container Action Success
  * Check Execute Inline Action Success
- Error path: success === false → Log Error node
- Success path: continues to original result handling
- Log Error node receives error data from sub-workflows
- Pass-through design preserves data for downstream handlers

Main workflow: 172 → 176 nodes (+4)
- 2 correlation ID generators
- 2 error detection IF nodes

Error ring buffer now captures:
- Container action failures (Docker API errors)
- Sub-workflow errors with full diagnostic context
- Correlation IDs for request tracing
- Workflow name, node, HTTP codes, raw responses
2026-02-08 18:56:44 -05:00
Lucas Berger 1c632d039a feat(10.2-02): add structured error returns to all 7 sub-workflows
- Added correlationId field to all sub-workflow trigger schemas
- Added success: true/false fields to return paths
- Added error objects to failure paths with workflow, node, message, httpCode, rawResponse
- Implemented correlationId pass-through for error correlation
- Preserved backward compatibility (existing return fields unchanged)

Modified sub-workflows:
- n8n-actions.json: 3 Format Result nodes with full error objects
- n8n-update.json: Pull/Create/Start error paths with error objects
- n8n-logs.json: Added correlationId pass-through
- n8n-batch-ui.json: Added correlationId to trigger
- n8n-status.json: Added correlationId to trigger
- n8n-confirmation.json: Added correlationId pass-through to stop action
- n8n-matching.json: Added correlationId to trigger

All sub-workflows now return structured error objects on failures for main workflow error ring buffer capture.
2026-02-08 18:56:44 -05:00
Lucas Berger 6833641ad1 docs(10.2-01): complete error ring buffer foundation plan
- Create 10.2-01-SUMMARY.md with full plan execution details
- Update STATE.md: Phase 10.2 plan 1 of 3 complete (33% progress)
- Document all technical decisions and architecture patterns
- Self-check verification passed: all files and commits present
- Duration: 156 seconds (2.6 minutes)
- Node count: 168 -> 172 (+4 nodes: 2 command, 2 utility)
- Ring buffer infrastructure ready for Plan 02 wiring
2026-02-08 18:56:44 -05:00
Lucas Berger 030118efb3 feat(10.2-01): add error and trace logging utility nodes
- Create Log Error code node with ring buffer write logic
- Create Log Trace code node with debug mode check and auto-disable
- Both nodes implement ring buffer (max 50 entries) with auto-rotation
- Log Error: accepts error data, truncates large fields (stack 500, raw 1000)
- Log Error: passes through input data with _errorLogged flag
- Log Trace: checks debug.enabled before logging, passes through unchanged
- Log Trace: auto-disables debug mode after 100 executions
- Both nodes positioned at utility area (2600, -200/-400)
- Nodes are standalone (no connections) - ready for Plan 02 wiring
- Node count: 170 -> 172 (+2 utility nodes)
2026-02-08 18:56:44 -05:00
Lucas Berger d1d13ca671 feat(10.2-01): add hidden debug commands and error ring buffer foundation
- Add 4 new keyword routes: /errors, /clear-errors, /debug, /trace
- Create Process Debug Command code node with unified command handling
- Initialize workflow static data structure (errorLog with debug, errors, traces)
- Implement /errors command to display recent errors (default 5, max 50)
- Implement /clear-errors command to reset error buffer
- Implement /debug on|off|status for debug mode toggle
- Implement /trace <correlationId> for correlation-based query
- Add Send Debug Response Telegram node with HTML formatting
- Wire Keyword Router -> Process Debug Command -> Send Debug Response
- Commands remain hidden (not listed in /start menu)
- Node count: 168 -> 170 (+2 nodes)
2026-02-08 18:56:44 -05:00
Lucas Berger c79a3fbf87 docs(10.2): plan phase — error ring buffer, sub-workflow error propagation, debug tracing
3 plans in 3 waves:
- Wave 1: Ring buffer foundation + hidden debug commands (/errors, /debug, /trace, /clear-errors)
- Wave 2: Structured error returns in all 7 sub-workflows + correlation ID tracking
- Wave 3: Debug mode tracing at sub-workflow boundaries + deployment verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger e9a84794b9 docs(10.2): create phase plan 2026-02-08 18:56:44 -05:00
Lucas Berger 0ef36ab4c8 docs(10.2): research phase domain 2026-02-08 18:56:44 -05:00
Lucas Berger df637c9286 docs(10.2): capture phase context 2026-02-08 18:56:44 -05:00