Commit Graph
100 Commits
Author SHA1 Message Date
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 BergerandClaude Opus 4.6 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 BergerandClaude Opus 4.6 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 BergerandClaude Opus 4.6 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 BergerandClaude Opus 4.6 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 BergerandClaude Opus 4.6 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
Lucas BergerandClaude Opus 4.6 ac2d745e1d fix(10.1-09): wire /list command connection to Prepare Status Input
The list keyword rule was added to Keyword Router but its connection
pointed to Show Menu (fallback) instead of Prepare Status Input.
Added proper connection at index 8 and shifted fallback to index 9.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 8db937683e docs(phase-10.1): complete phase execution 2026-02-08 18:56:44 -05:00
Lucas Berger 0b6b12ee7e docs(10.1-09): complete UAT gap closure plan 2026-02-08 18:56:44 -05:00
Lucas Berger e67800c4f6 chore(10.1-09): deploy updated workflow to n8n
- Successfully deployed n8n-workflow.json to n8n instance
- Workflow ID: HmiXBlJefBRPMS0m4iNYc
- All three UAT gap fixes now live
2026-02-08 18:56:44 -05:00
Lucas Berger f4fd5d5256 docs(10.1-08): complete container action status code handling plan 2026-02-08 18:56:44 -05:00
Lucas Berger a5cffc3745 feat(10.1-09): add /list command to Keyword Router
- Added 'list' route with same output as 'status'
- Both /list and /status now show paginated container list
- Provides user-expected /list command while leveraging existing functionality
2026-02-08 18:56:44 -05:00
Lucas Berger 0ba573a24d feat(10.1-08): add statusCode handling to container action result formatters
- Add HTTP 304 detection for 'already in desired state' (success: true)
- Add HTTP 404 detection for 'container not found' (success: false)
- Add HTTP 500+ detection for server errors (success: false)
- Apply to Format Stop/Start/Restart Result nodes
- StatusCode checks run before existing message-based fallback logic
2026-02-08 18:56:44 -05:00
Lucas Berger 9982a59adc fix(10.1-09): use dynamic input in Build Cancel Return Submenu
- Changed $('Prepare Cancel Return').item.json to $input.item.json
- Allows node to work with both cancel paths (batch cancel and confirmation cancel)
- Fixes confirmation dialog cancel button returning to container status view
2026-02-08 18:56:44 -05:00
Lucas Berger 95f29e5433 fix(10.1-09): use actionType field in Build Batch Keyboard
- Changed const action = $json.action to $json.actionType
- Fixes disambiguation keyboard showing 'multiple all?' instead of actual action
- Ensures correct callback_data format: bexec:{action}:... not bexec:multiple:...
2026-02-08 18:56:44 -05:00
Lucas Berger f3ab7cf312 docs(10.1): create UAT gap closure plans (08-09) 2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 b74fb3c19c test(10.1): diagnose 4 UAT issues with root causes
- Gap 1: Format Stop/Start/Restart missing statusCode 304 check
- Gap 2: Build Batch Keyboard reads action instead of actionType
- Gap 3: /list not implemented in Keyword Router (minor)
- Gap 4: Build Cancel Return Submenu references wrong predecessor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 14589f3cb6 test(10.1): complete UAT - 11 passed, 4 issues
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 22bbe4b6ba docs(10.1): mark Phase 10.1 complete in roadmap (7/7 plans)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 2a4505d2d4 docs(10.1-07): complete Code classification and contract documentation plan
- 10.1-07-SUMMARY.md: Plan execution results with self-check passed
- STATE.md: Phase 10.1 marked COMPLETE (7/7 plans), decisions updated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 178bc544dc docs(10.1-07): document sub-workflow contracts and node count analysis
- Add detailed I/O contracts for all 7 sub-workflows with field-level docs
- Verify all 17 Execute Workflow nodes receive correct input fields
- Add node count analysis proving 168 nodes is 2 above structural minimum
- Show diminishing returns evidence (extraction efficiency: 81% -> 0% -> -50%)
- Close verification gaps 2 and 3 with documented evidence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 f0aae416aa docs(10.1-07): classify all 60 Code nodes in main workflow
- Add Code Node Classification section to DEPLOY-SUBWORKFLOWS.md
- Classify each Code node into 6 categories with evidence
- 58 nodes confirmed as orchestration infrastructure (must stay)
- 2 domain-logic candidates identified but extraction is net-negative
- Summary proves no further extraction is viable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 4eeed1d9e1 docs(10.1-06): complete matching extraction plan 2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 6824697295 fix(10.1-06): fix batch text command data flow through matching sub-workflow
Added "Prepare Batch Execution" Code node between Route Batch Match Result
and Route Batch Action to transform matching sub-workflow output:
- matchedContainers -> allMatched (field name expected by downstream nodes)
- action from Detect Batch Command (stop/start/restart) instead of
  "batch_matched" routing label from sub-workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 aae95e2405 fix(10.1-06): strip inline keyboard from text-mode status responses
Text commands like "status book" should show plain text status without
inline keyboard buttons. Added "Strip Status Keyboard" Code node that
removes reply_markup before sending via Send Container Submenu Direct.
Callback-based status (with messageId) still gets the full UI with buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 138728a7b1 fix(10.1-06): fix action type passthrough and text status routing
- Prepare Text Action Input now reads action (stop/start/restart) from
  Parse Action Command instead of matching sub-workflow's actionType field
- Added "Has Status Message ID" If node to route status_direct results:
  messageId > 0 → Edit Container List (callback), messageId == 0 →
  Send Container Submenu Direct (text command)
- Pre-existing bug: text "status <name>" routed to editMessageText with
  messageId 0, causing Telegram API error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 596b0e5dab fix(10.1-06): replace matching workflow placeholders with deployed ID kL4BoI8ITSP9Oxek
- Updated 3 Execute Workflow nodes: Execute Action Match, Execute Update Match, Execute Batch Match
- Deployed n8n-matching.json as workflow kL4BoI8ITSP9Oxek
- Pushed main workflow to n8n API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 d5246ba1c6 feat(10.1-06): update main workflow to call matching sub-workflow
- Remove 12 matching/disambiguation logic nodes from main workflow
- Add 9 integration nodes: 3 Prepare Input + 3 Execute Workflow + 3 Route Result
- Net reduction: 3 nodes (168 -> 165)
- Wire Docker List for Action -> Prepare -> Execute -> Route -> existing handlers
- Wire Docker List for Update -> Prepare -> Execute -> Route -> existing handlers
- Wire Get Containers for Batch -> Prepare -> Execute -> Route -> existing handlers
- Preserve all 6 Telegram response nodes in main workflow
- Update Prepare Text Action/Update Input to use sub-workflow return data
- Backup created at n8n-workflow.json.backup-matching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.6 f57c706e01 feat(10.1-06): create n8n-matching.json sub-workflow
- Extract 12 matching/disambiguation logic nodes into sub-workflow
- 23 nodes total: trigger + router + 12 logic + 9 format-return nodes
- Three action paths: match_action, match_update, match_batch
- Every exit path returns JSON with action field per established pattern
- Adapted input references to use trigger data instead of main workflow refs
- No response nodes included (stay in main per locked decision)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:56:44 -05:00
Lucas Berger 18f8976a7f fix(10.1): revise plans based on checker feedback 2026-02-08 18:56:44 -05:00
Lucas Berger c437aa534f docs(10.1): create gap closure plans (06-07) 2026-02-08 18:56:44 -05:00
Lucas BergerandClaude Opus 4.5 1337f89114 docs(10.1): create gap closure plan for verification gaps
Phase 10.1 verification found 3 gaps:
- Gap 1: Node count 168 vs 115-125 target (needs user decision)
- Gap 2: Code node analysis incomplete (documentation task)
- Gap 3: Sub-workflow contracts not documented (documentation task)

Plan 10.1-06 addresses gaps with:
- Task 1: Document all 6 sub-workflow input/output contracts
- Task 2: Classify all 62 Code nodes by purpose
- Task 3: User decision checkpoint on node count approach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 09:03:57 -05:00
Lucas BergerandClaude Opus 4.5 4d101a4299 wip: 10.1 paused at verification decision point
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:37:24 -05:00
Lucas BergerandClaude Opus 4.5 36a6ff2e8e docs(10.1-05): complete integration verification plan
- Created 10.1-05-SUMMARY.md documenting verification and UAT
- Updated STATE.md to reflect phase completion (5/5 plans)
- Updated ROADMAP.md to mark phase 10.1 complete
- Updated DEPLOY-SUBWORKFLOWS.md with deployed workflow IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:31:04 -05:00
Lucas BergerandClaude Opus 4.5 66574efed2 fix(logs): properly parse Docker multiplexed stream format
Docker logs API returns multiplexed stream with 8-byte headers per frame,
not just newline-separated text. The old code split on \n which missed
frames that weren't newline-terminated.

Now properly parses the binary stream format:
- Reads 8-byte header (stream type + frame size)
- Extracts frame data based on size
- Splits frame content by newlines
- Correctly counts and displays requested number of lines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:26:18 -05:00
Lucas BergerandClaude Opus 4.5 df9a4420e9 fix(batch): support text-based batch commands (not just keyboard)
Text-based batch commands (e.g., /start container1 container2) were
failing because Send Batch Start Message always used editMessageText,
but you can't edit the user's message.

Fixed by:
- Conditionally use sendMessage vs editMessageText based on fromKeyboard
- Capture new message_id from sendMessage response for progress updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:21:50 -05:00
Lucas BergerandClaude Opus 4.5 e9a971a014 fix(routing): connect batchStopConfirm to Answer Batch Stop Confirm
Output 11 was incorrectly going to Build Callback Action (single
container handler) instead of Answer Batch Stop Confirm (batch handler).

The batch stop confirm flow should be:
Answer Batch Stop Confirm -> Check Batch Stop Expired -> Prepare Batch Stop Exec

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:16:54 -05:00
Lucas BergerandClaude Opus 4.5 ad89700844 fix(routing): swap batchStopConfirm and batchStopCancel connections
Route Callback outputs 11 and 12 were swapped:
- batchStopConfirm was going to Answer Batch Stop Cancel
- batchStopCancel was going to Build Callback Action

Now correctly routed:
- batchStopConfirm (output 11) -> Build Callback Action
- batchStopCancel (output 12) -> Answer Batch Stop Cancel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:14:41 -05:00
Lucas BergerandClaude Opus 4.5 e4740dddb4 fix(batch): pass batchAction to Batch UI sub-workflow
The batch action (stop/start/restart) was being lost because:
1. Parse Callback Data extracted action: "stop"
2. Prepare Batch UI Input overwrote it with action: "exec" (the UI action type)
3. Handle Exec tried to parse callbackData which was empty

Fixed by:
- Adding batchAction field to Prepare Batch UI Input
- Adding batchAction to Batch UI trigger schema
- Updating Handle Exec to use triggerData.batchAction and selectedCsv

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:11:50 -05:00
Lucas BergerandClaude Opus 4.5 1a47176713 fix(telegram): use HTTP Request for editMessageText with keyboards
The n8n Telegram node's inlineKeyboard parameter doesn't work reliably
with editMessageText operation. Switched to HTTP Request node calling
Telegram API directly, which properly passes reply_markup.

Changed nodes:
- Send Confirmation Dialog
- Send Stop Result
- Send Expired Message

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:07:20 -05:00
Lucas BergerandClaude Opus 4.5 0983a5f99a fix(telegram): use inline_keyboard array for Telegram node
The n8n Telegram node's inlineKeyboard parameter expects the keyboard
rows array directly, not the full {inline_keyboard: [...]} object.

Fixed nodes:
- Send Confirmation Dialog
- Send Stop Result
- Send Expired Message

Changed from: JSON.stringify($json.reply_markup)
Changed to: JSON.stringify($json.reply_markup.inline_keyboard)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:04:20 -05:00
Lucas BergerandClaude Opus 4.5 224f5469ab fix(routing): correct Route Callback connection offsets
The batch rule was added at index 4 but connections weren't updated,
causing all subsequent rules to route to wrong handlers:
- select → Answer List Callback (wrong)
- list → Answer Action Callback (wrong)
- action → Answer Noop Callback (wrong)
- noop → nothing (missing)

Fixed by correcting outputs 5-8 to connect to proper handlers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:00:09 -05:00
Lucas BergerandClaude Opus 4.5 99612a9649 fix(10.1-05): fix Route Action connections in status sub-workflow
Switch node connections must use "main" array format with indices,
not named output keys. Changed from:
  { "list": [...], "status": [...] }
to:
  { "main": [ [...], [...], [...] ] }

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:52:36 -05:00
Lucas BergerandClaude Opus 4.5 58e4fbdbbe fix(10.1-05): add mode: once to Execute Status nodes
Execute Workflow nodes need mode: "once" to properly pass input
data to sub-workflows. Added to:
- Execute Container Status
- Execute Select Status
- Execute Paginate Status
- Execute Batch Cancel Status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:47:41 -05:00
Lucas BergerandClaude Opus 4.5 8727b4f7a8 fix(10.1-05): wire Route Status Result to Telegram nodes
Route Status Result had no outgoing connections after status
sub-workflow extraction. Added connections:
- list output → Send Container List
- status_direct output → Edit Container List
- error output → Send Docker Error

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:44:10 -05:00
Lucas BergerandClaude Opus 4.5 fae429a05e feat(10.1-05): deploy sub-workflows to n8n with real IDs
- Replaced TODO placeholders with actual n8n workflow IDs:
  - Batch UI: ZJhnGzJT26UUmW45
  - Container Status: lqpg2CqesnKE2RJQ
  - Confirmation Dialogs: fZ1hu8eiovkCk08G
- Updated instructions.md with new workflow IDs and renamed files
- All workflows deployed and activated in n8n

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:39:37 -05:00
Lucas Berger 68dd7ff803 docs(10.1-05): add sub-workflow deployment guide
- Documents 6 sub-workflows (3 deployed, 3 pending)
- Lists all Execute Workflow nodes and target IDs
- Provides deployment steps for TODO placeholders
- Includes rollback instructions using backup files
- Architecture diagram shows workflow relationships
- Input/output contracts for new sub-workflows
- Testing checklist for post-deployment verification
2026-02-04 21:37:10 -05:00
Lucas BergerandClaude Opus 4.5 4649ed5a5f docs(10.1-04): complete confirmation sub-workflow plan
Tasks completed: 3/3
- Create n8n-confirmation.json sub-workflow
- Update main workflow with confirmation integration
- Create backup

SUMMARY: .planning/phases/10.1-aggressive-workflow-modularization/10.1-04-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:34:47 -05:00
Lucas BergerandClaude Opus 4.5 1a9f63dbbc chore(10.1-04): add backup before confirmation extraction
- Backup file: n8n-workflow.json.backup-confirm
- Pre-extraction node count: 178 (post-10.1-03)
- Post-extraction node count: 168

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:33:38 -05:00
Lucas BergerandClaude Opus 4.5 36ecdd5ba9 feat(10.1-04): integrate confirmation sub-workflow in main workflow
- Removed 19 single-container confirmation nodes
- Added 9 integration nodes (net -10 nodes: 178->168)
- Route Callback[9,10] (confirm/cancelConfirm) -> Execute Confirmation
- Route Action Type[2,3] (stop/update) -> Execute Confirmation
- Route Confirmation Result handles show/stop_result/confirm_update/cancel/expired
- Added TODO_DEPLOY_CONFIRMATION_WORKFLOW placeholder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:33:23 -05:00
Lucas BergerandClaude Opus 4.5 47c2b47c99 feat(10.1-04): create confirmation dialogs sub-workflow
- New n8n-confirmation.json with 16 nodes
- Handle show_stop/show_update dialog generation
- Handle confirm_stop with expiry checking
- Handle confirm_update (returns action for main workflow)
- Handle cancel and expired actions
- Calls n8n-actions.json for confirmed stop execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:31:36 -05:00
Lucas Berger 3d138688e5 docs(10.1-03): complete container status sub-workflow plan
Tasks completed: 3/3
- Task 1: Create n8n-status.json sub-workflow
- Task 2: Update main workflow with sub-workflow calls
- Task 3: Create backup for rollback

SUMMARY: .planning/phases/10.1-aggressive-workflow-modularization/10.1-03-SUMMARY.md
2026-02-04 21:28:25 -05:00
Lucas Berger 4245a49f78 chore(10.1-03): add backup for status extraction
- Created n8n-workflow.json.backup-status for rollback
- Verified no orphan node references in main workflow
- Status sub-workflow has 11 nodes with Execute Workflow Trigger
2026-02-04 21:27:13 -05:00
Lucas Berger 13ed81cccf feat(10.1-03): update main workflow to call status sub-workflow
- Removed 10 list/status nodes (Docker queries, keyboard building)
- Added 9 integration nodes (Prepare/Execute pairs for status, select, paginate)
- Keyword Router status output -> Prepare Status Input -> Execute Container Status
- Answer Select Callback -> Execute Select Status -> Send Container Submenu
- Answer List Callback -> Execute Paginate Status -> Edit Container List
- Prepare Batch Cancel Return -> Execute Batch Cancel Status -> Edit Container List
- Added TODO_DEPLOY_STATUS_WORKFLOW placeholder for deployment
2026-02-04 21:26:55 -05:00
Lucas Berger 369eb2a87e feat(10.1-03): create container status sub-workflow
- Created n8n-status.json with 11 nodes
- Handles list, status, and paginate actions
- Input: chatId, messageId, action, containerName, page, queryId, searchTerm
- Output: success, action, text, reply_markup, container data
- Docker queries via HTTP request to docker-socket-proxy
2026-02-04 21:24:46 -05:00
Lucas Berger 884fefaab5 docs(10.1-02): complete batch UI extraction plan
Tasks completed: 3/3
- Task 1: Create n8n-batch-ui.json sub-workflow (16 nodes)
- Task 2: Update main workflow (192 -> 179 nodes, -13)
- Task 3: Create backup for rollback

SUMMARY: .planning/phases/10.1-aggressive-workflow-modularization/10.1-02-SUMMARY.md
2026-02-04 21:21:32 -05:00
Lucas Berger 8b9af171b6 feat(10.1-02): extract batch UI to sub-workflow
- Updated main workflow to call n8n-batch-ui.json sub-workflow
- Main workflow reduced from 192 to 179 nodes (-13 nodes)
- Removed 22 batch UI nodes now handled by sub-workflow:
  - Fetch/Build/Rebuild Batch Select Keyboard nodes
  - Handle Batch Toggle/Clear/Exec/Nav nodes
  - Answer and Edit keyboard nodes
- Added 9 new nodes for sub-workflow integration:
  - Prepare Batch UI Input
  - Execute Batch UI (TODO_DEPLOY_BATCH_UI_WORKFLOW placeholder)
  - Route Batch UI Result with action routing
  - Telegram response handlers for keyboard/confirm/cancel/limit
- Batch execution loop remains in main workflow (orchestration)
- Created backup file for rollback capability

Part of batch UI extraction (Task 2-3/3)
2026-02-04 21:19:57 -05:00
Lucas Berger 07a62d13f1 feat(10.1-02): create batch UI sub-workflow
- Created n8n-batch-ui.json with 16 nodes
- Handles batch selection UI: mode, toggle, nav, clear, cancel, exec actions
- Returns structured data for main workflow to send Telegram responses
- Entry point: Execute Workflow Trigger with input contract
- Uses existing Docker API pattern for container listing

Part of batch UI extraction (Task 1/3)
2026-02-04 21:16:13 -05:00
Lucas Berger cd7c177553 docs(10.1-01): complete foundation and domain analysis plan
Tasks completed: 3/3
- Rename sub-workflows to shorter pattern
- Analyze main workflow domain boundaries
- User approval on extraction boundaries

SUMMARY: .planning/phases/10.1-aggressive-workflow-modularization/10.1-01-SUMMARY.md
2026-02-04 21:10:07 -05:00
Lucas Berger fba90a6cc4 docs(10.1-01): analyze main workflow domain boundaries
Domain analysis of 192-node main workflow:
- Batch UI/Orchestration: 48 nodes (HIGH extraction value)
- Container List/Menu: 17 nodes (HIGH extraction feasibility)
- Confirmation Dialogs: 30 nodes (MEDIUM extraction feasibility)
- Matching/Disambiguation: 15 nodes (optional extraction)
- Telegram Responses: 58 nodes (LOCKED to remain in main)

Key finding: Target of 50-80 nodes not achievable due to locked
Telegram response pattern. Realistic target: 115-125 nodes.

Recommended extraction order:
- Wave 2: Batch UI + Container List
- Wave 3: Confirmation + Matching (optional)
2026-02-04 20:29:21 -05:00
Lucas Berger ff532aa99e refactor(10.1-01): rename sub-workflows to shorter pattern
- n8n-container-update.json -> n8n-update.json
- n8n-container-actions.json -> n8n-actions.json
- n8n-container-logs.json -> n8n-logs.json

Workflow IDs remain unchanged (n8n assigns on import).
Main workflow Execute Workflow nodes reference by ID, not filename.
2026-02-04 20:26:34 -05:00
Lucas BergerandClaude Opus 4.5 25dd3ab2d2 docs(10.1): create phase plan
Phase 10.1: Aggressive Workflow Modularization
- 5 plan(s) in 3 wave(s)
- Wave 1: Foundation (rename files, analyze boundaries, user approval)
- Wave 2: 3 parallel extractions (batch-ui, status, confirmation)
- Wave 3: Integration verification and UAT
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:20:29 -05:00
Lucas Berger f071a949b1 docs(10.1): research phase domain
Phase 10.1: Aggressive Workflow Modularization
- Standard stack identified (Execute Workflow nodes, sub-workflow patterns)
- Architecture patterns documented (input contracts, error handling, routing)
- Pitfalls catalogued (memory issues, data references, error gaps, circular deps)
- Analyzed existing workflows (192 nodes main, 3 sub-workflows)
- Validated patterns against n8n docs and community best practices
- Confidence: HIGH (grounded in existing implementations + locked user decisions)
2026-02-04 20:14:22 -05:00
Lucas BergerandClaude Opus 4.5 8e372dd8ed wip: 10.1-aggressive-workflow-modularization paused at context gathered
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:01:32 -05:00
Lucas BergerandClaude Opus 4.5 9285f3e011 docs(10.1): capture phase context
Phase 10.1: Aggressive Workflow Modularization
- Implementation decisions documented
- Phase boundary established
- Fixed misnamed phase directories (10.1/10.2)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:00:37 -05:00
Lucas BergerandClaude Opus 4.5 a8c9ab69d6 fix(batch): edit message in place instead of delete+send
- Skip Delete Batch Select Message node for batch start
- Use editMessageText instead of sendMessage
- Batch start now smoothly transitions like batch stop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:41:07 -05:00
Lucas BergerandClaude Opus 4.5 23f60ff043 fix(batch): edit confirmation message instead of sending new one
Changed batch start to editMessageText so the confirmation message
gets updated with progress/results instead of leaving it hanging
and sending a separate progress message.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:30:42 -05:00
Lucas BergerandClaude Opus 4.5 d043e11bd4 fix(actions): fix paired item reference in Format Result nodes
Changed from $('When executed by another workflow') to $('Route Action')
to avoid paired item reference errors when data flows through the
Resolve Container ID path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:26:31 -05:00
Lucas BergerandClaude Opus 4.5 4ea0824c40 chore: add project-level Claude instructions
Includes n8n API integration docs, workflow IDs, push commands,
and technical patterns learned during development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:22:41 -05:00
Lucas BergerandClaude Opus 4.5 adbd7bd87d fix(batch): resolve container IDs in sub-workflows
When batch operations are triggered via keyboard callbacks, the main
workflow only passes container names (not IDs). The sub-workflows now:
- Check if containerId is empty
- If empty, query Docker API to resolve name → ID
- Then proceed with the action

This fixes batch start/stop/restart/update operations failing with
404 "page not found" errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:19:33 -05:00
Lucas BergerandClaude Opus 4.5 f7859fc3c4 docs(phase-10): complete workflow modularization phase
All 7 plans executed and verified:
- 3 sub-workflows (Update, Actions, Logs)
- UAT gaps closed (race conditions, data chains, fuzzy matching)
- Main workflow: 209 → 192 nodes (-8%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:05:06 -05:00
Lucas Berger b156fe48cf docs(10-07): complete UAT gap closure plan
Tasks completed: 5/5
- Fix text update race condition (remove parallel message)
- Fix batch update data chain (Build Progress Message reference)
- Fix batch action data chain (Build Progress Message reference)
- Add fuzzy matching to logs and fix chatId reference
- Add timestamp to logs refresh for message not modified error

SUMMARY: .planning/phases/10-workflow-modularization/10-07-SUMMARY.md
2026-02-04 16:01:49 -05:00
Lucas Berger 1869cab358 fix(10-07): add timestamp to logs refresh to prevent message not modified error
- Format Inline Logs Result now adds timestamp to message
- Shows 'Updated: HH:MM:SS' at bottom of logs display
- Ensures Telegram API always accepts refresh (content always different)
2026-02-04 16:00:30 -05:00
Lucas Berger 77c3d6543d fix(10-07): add fuzzy matching to logs and fix chatId reference
- Send Logs Response now uses Prepare Text Logs Input for chatId
- Container logs sub-workflow uses .includes() for fuzzy matching
- Multiple match handling added with helpful error message
2026-02-04 16:00:07 -05:00
Lucas Berger 28f4c59d3f fix(10-07): fix batch action data chain reference
- Prepare Batch Action Input now uses Build Progress Message reference
- Fixes 'Cannot read properties of undefined' error for batch actions
- Data chain: Build Progress Message -> Edit Progress Message -> Prepare Batch Action Input
2026-02-04 15:59:33 -05:00
Lucas Berger 63a0019ccf fix(10-07): fix batch update data chain reference
- Prepare Batch Update Input now uses Build Progress Message reference
- Fixes 'Cannot read properties of undefined' error
- Data chain: Build Progress Message -> Edit Progress Message -> Prepare Batch Update Input
2026-02-04 15:59:05 -05:00
Lucas Berger 9d38bf9f51 fix(10-07): remove text update race condition
- Remove parallel Send Text Update Started connection
- Text updates now only send result via sub-workflow
- Fixes duplicate message issue (Updating... + already up to date)
2026-02-04 15:58:47 -05:00
Lucas BergerandClaude Opus 4.5 5a6b6e3e85 docs(10): create UAT gap closure plan 10-07
Phase 10 UAT revealed 5 gaps:
- Text update race condition (parallel message send)
- Batch update/action data chain broken ($json vs Build Progress Message)
- Logs fuzzy matching missing
- Logs refresh "message not modified" error

10-07-PLAN.md addresses all gaps in 5 tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:54:02 -05:00
Lucas BergerandClaude Opus 4.5 ff675b7e19 test(phase-10): complete UAT - 4 passed, 5 issues
Issues found:
1. Text update sends duplicate messages (sub-workflow + main)
2. Batch update broken - data chain broken after Edit Progress Message
3. Batch actions broken - same data chain issue
4. Logs text command - no fuzzy matching, chatId not preserved
5. Logs refresh - doesn't handle 'message not modified' error

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:50:20 -05:00
Lucas BergerandClaude Opus 4.5 1d55988aff docs(phase-10): complete workflow modularization phase
Phase 10 achievements:
- 3 sub-workflows: Update, Actions, Logs (all deployed)
- Main workflow: 209 → 192 nodes (-8%)
- Consolidated all container operations
- Removed old batch inline path
- Modernized callback formats

Deferred to Phase 10.1: Aggressive modularization (50-80 node target)
Added Phase 10.2: Better Logging & Log Management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:10:19 -05:00
Lucas BergerandClaude Opus 4.5 57ca18f4d4 refactor(10-06): remove old batch inline path and modernize callbacks
- Update Build Batch Keyboard to use bexec: format instead of legacy JSON
- Update Build Suggestion Keyboard to use action: format instead of legacy JSON
- Remove 7 nodes from old batch inline execution path:
  - Build Batch Commands
  - Prepare Batch Execution
  - Execute Batch Action
  - Parse Batch Result
  - Format Batch Result
  - Send Batch Result
  - Answer Batch Query

Node count: 199 -> 192 (-7 nodes)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:07:05 -05:00
Lucas BergerandClaude Opus 4.5 9799de9418 fix(10-06): deploy logs sub-workflow and wire to main
- Deploy Container Logs sub-workflow to n8n (ID: oE7aO2GhbksXDEIw)
- Replace TODO_DEPLOY_LOGS_WORKFLOW with actual workflow ID
- Update n8n-container-logs.json with deployed ID
- Redeploy all workflows to n8n

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:04:14 -05:00
Lucas Berger e160b3e1cd docs(10-06): complete remediation plan
Tasks completed: 4/5 (1 skipped - path still needed)
- Fix batch actions routing to use sub-workflow
- Wire logs sub-workflow (deployment documented)
- Remove Python helper scripts (6 files, 1468 lines)
- Task 3 skipped: old inline path handles legacy callbacks

SUMMARY: .planning/phases/10-workflow-modularization/10-06-SUMMARY.md
2026-02-04 14:55:46 -05:00
Lucas Berger 2bf607ea01 chore(10-06): remove Python helper scripts
- Delete refactor_workflow.py
- Delete task1_batch_update.py
- Delete task2_batch_actions.py
- Delete task3_logs_subworkflow.py
- Delete task3_update_main.py
- Delete task4_cleanup.py

These were development-time helpers for JSON manipulation, not runtime code.
2026-02-04 14:54:30 -05:00
Lucas Berger 1d420bd7dd fix(10-06): update logs sub-workflow placeholder
- Replace PLACEHOLDER_LOGS_ID with TODO_DEPLOY_LOGS_WORKFLOW
- Applies to Execute Text Logs and Execute Inline Logs nodes
- Clear marker indicates n8n-container-logs.json deployment required
- User must replace TODO with actual workflow ID after n8n import
2026-02-04 14:53:13 -05:00
Lucas Berger 807583dfff fix(10-06): fix batch actions routing to use sub-workflow
- Add exclusion condition to Route Callback rule 4 (isBatch)
- Rule now requires isBatch=true AND isBatchExec!=true
- Ensures batch execution callbacks route to Handle Batch Exec (output 17)
- Prevents bypass to old Build Batch Commands inline path (output 4)
2026-02-04 14:52:44 -05:00
Lucas Berger ed0e0e7ba2 docs(10-05): complete modularization plan
Tasks completed: 4/4
- Wire batch update to Container Update sub-workflow
- Wire batch actions to Container Actions sub-workflow
- Extract logs flow to Container Logs sub-workflow
- Clean up and verify workflow

Results:
- Main workflow: 209 → 199 nodes (-10, -4.8%)
- Created n8n-container-logs.json sub-workflow (9 nodes)
- All batch operations use sub-workflows (eliminated duplicate logic)
- 9 sub-workflow calls total (3 for Update, 4 for Actions, 2 for Logs)

Phase 10 now COMPLETE.

SUMMARY: .planning/phases/10-workflow-modularization/10-05-SUMMARY.md
2026-02-04 14:00:33 -05:00
Lucas Berger 186f11362e chore(10-05): verify and document workflow refactoring
- Run cleanup and verification script
- No orphaned nodes found
- Workflow structure validated
- Final node count: 199 (reduced from 209, -4.8%)
- Add comprehensive deployment guide

Node composition:
- 79 code nodes
- 50 httpRequest nodes
- 27 telegram nodes
- 14 if nodes
- 10 switch nodes
- 9 executeCommand nodes
- 9 executeWorkflow nodes (sub-workflow calls)
- 1 telegramTrigger node

Note: Node count (199) is above target range (120-150) but achieves
primary goals of eliminating duplicate logic. Further optimization
possible (~40-45 nodes) by consolidating batch UI and confirmation flows.

Deployment requires importing n8n-container-logs.json and updating
the workflow ID in main workflow Execute Text/Inline Logs nodes.
2026-02-04 13:58:48 -05:00