6.4 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | duration | completed | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 10.1-aggressive-workflow-modularization | 06 | workflow |
|
|
|
|
|
|
|
|
16min | 2026-02-08 |
Phase 10.1 Plan 06: Matching/Disambiguation Sub-workflow Summary
Extracted matching/disambiguation domain into n8n-matching.json sub-workflow (23 nodes), deployed via API, fixed 3 data flow issues found during runtime verification
Performance
- Duration: ~16 min
- Started: 2026-02-08T13:30:00Z
- Completed: 2026-02-08T14:05:26Z
- Tasks: 3 (2 auto + 1 checkpoint)
- Files modified: 3
Accomplishments
- Created n8n-matching.json sub-workflow with 23 nodes (12 logic + 1 trigger + 1 router + 9 format-return)
- Three matching paths: action match, update match, batch match
- Deployed via n8n API (ID:
kL4BoI8ITSP9Oxek) - All 6 Telegram response nodes preserved in main workflow per locked decision
- Fixed pre-existing text-mode status routing bug (editMessageText with messageId 0)
- Main workflow: 168 nodes (net 0 change due to fix nodes added during verification)
Task Commits
Each task was committed atomically:
- Task 1: Create n8n-matching.json -
e86941c(feat) - Task 2: Update main workflow -
de64d1b(feat) - Task 3: Deploy and verify -
fc955e6(fix: deploy IDs),22638fd(fix: action passthrough + status routing),11365b8(fix: strip status keyboard),cccf455(fix: batch data flow)
Files Created/Modified
n8n-matching.json- New sub-workflow: fuzzy container matching, disambiguation, suggestion building (23 nodes)n8n-workflow.json- Main workflow with matching extracted and integration fixes (168 nodes)n8n-workflow.json.backup-matching- Pre-extraction backup
Decisions Made
-
Action passthrough pattern: The matching sub-workflow doesn't carry the user's requested action (stop/start/restart) through its return data. Downstream nodes reference the original parse node (
Parse Action CommandorDetect Batch Command) directly for the action type. This avoids expanding the sub-workflow's input/output contract. -
Text-mode status routing: Added
Has Status Message IDIf node to routestatus_directresults — messageId > 0 goes toEdit Container List(callback), messageId == 0 goes to text send viaStrip Status Keyboard→Send Container Submenu Direct. -
Batch data transformation: Added
Prepare Batch ExecutionCode node to mapmatchedContainers→allMatchedand inject the real batch action fromDetect Batch Command, since downstream nodes expect different field names than the sub-workflow returns.
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] Action type not passed through matching sub-workflow
- Found during: Task 3 (runtime verification)
- Issue:
Prepare Text Action Inputreaddata.actionTypewhich resolved to"action"(a routing label) instead of"stop" - Fix: Changed to read
$('Parse Action Command').item.json.actiondirectly - Files modified: n8n-workflow.json
- Verification: "stop booklore" correctly executes stop
- Committed in:
22638fd
2. [Rule 1 - Bug] Text-mode status sent to editMessageText with messageId 0
- Found during: Task 3 (runtime verification)
- Issue: Pre-existing bug — "status book" routed to
Edit Container List(editMessageText) which fails with messageId 0. Also showed inline keyboard buttons for text commands. - Fix: Added
Has Status Message IDIf node andStrip Status KeyboardCode node for text-mode routing - Files modified: n8n-workflow.json
- Verification: "status book" sends plain text without buttons
- Committed in:
22638fd,11365b8
3. [Rule 1 - Bug] Batch text commands: wrong field names and action
- Found during: Task 3 (runtime verification)
- Issue: Downstream nodes expected
allMatchedbut sub-workflow returnedmatchedContainers.Route Batch Actiongotaction: "batch_matched"instead of"stop". - Fix: Added
Prepare Batch ExecutionCode node to transform data - Files modified: n8n-workflow.json
- Verification: "stop plex dup" correctly executes batch stop
- Committed in:
cccf455
Total deviations: 3 auto-fixed (3 bugs) Impact on plan: All bugs were data flow mismatches caused by the sub-workflow returning different field names/values than what downstream nodes expected. The matching logic itself worked correctly. Node count is 168 instead of planned 165 due to 3 additional fix nodes (Has Status Message ID, Strip Status Keyboard, Prepare Batch Execution).
Issues Encountered
None beyond the deviations above — all resolved during runtime verification.
User Setup Required
None — deployed via n8n API during execution.
Next Phase Readiness
- Matching sub-workflow created and deployed (7th sub-workflow)
- All 4 viable extraction domains complete
- Ready for plan 10.1-07: Code node classification and contract documentation
Phase: 10.1-aggressive-workflow-modularization Completed: 2026-02-08