Commit Graph

359 Commits

Author SHA1 Message Date
Lucas Berger 403ac53b90 wip: 16-api-migration paused — waiting for Unraid 7.3 2026-02-09 12:48:24 -05:00
Lucas Berger 1cb1592bf4 docs: pause v1.4 — updateContainer requires Unraid 7.3+, v1.3 restored to n8n
UAT revealed Unraid GraphQL API (7.2.x) only has start/stop mutations.
updateContainer, updateContainers, updateAllContainers exist in API source
but ship in Unraid 7.3+ (unreleased). v1.3 workflows pushed to n8n as
stable rollback. v1.4 work preserved on branch for when 7.3 ships.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:46:48 -05:00
Lucas Berger 07aeace1fd fix(16): resolve 3 UAT issues — update flow, batch cancel, text commands
- Fix update sub-workflow: remove unsupported GraphQL filter arg, fix node
  reference (Format Pull Error → Format Update Error), fix field case
  (data.image → data.Image)
- Fix batch cancel: connect Route Callback output 20 (batchcancel) to
  Prepare Batch UI Input (was empty connection array)
- Fix text commands: change .item.json to .first().json for paired item
  breakage after GraphQL chain expansion; convert Send Batch Confirmation
  from Telegram node to HTTP Request to fix double-serialized reply_markup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:28:21 -05:00
Lucas Berger d4fcad827a test(16): complete UAT - 6 passed, 3 issues 2026-02-09 12:17:30 -05:00
Lucas Berger 3eeff5bf50 docs(phase-16): mark all 6 plans complete in roadmap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:46:42 -05:00
Lucas Berger ac3a0b37fc docs(phase-16): verification passed — all 6 must-haves verified
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:46:29 -05:00
Lucas Berger 245e4875c2 docs(phase-16): complete phase execution — all 6 plans finished
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:42:40 -05:00
Lucas Berger e8ec62ed43 feat(16-06): migrate text command paths to GraphQL API
Replaced 3 Execute Command nodes (docker-socket-proxy curl) with GraphQL query chains:
- Query Containers for Action/Update/Batch (HTTP Request nodes)
- Normalize Action/Update/Batch Containers (GraphQL normalizers)
- Update Registry (Action/Update/Batch) (Container ID Registry)

Updated Prepare Match Input nodes to consume normalized container arrays.

Changes:
- Node count: 181 -> 187 (+9 new, -3 removed)
- Zero Execute Command nodes remain
- All text command entry points now use GraphQL
- Only docker-socket-proxy reference is infra exclusion filter (Phase 17)
- All connections use node names (not IDs)
- All HTTP nodes use Header Auth credential

Verified: Workflow pushed successfully to n8n (HTTP 200)
2026-02-09 11:36:17 -05:00
Lucas Berger fcf87b611d docs: add n8n workflow JSON pitfalls to CLAUDE.md conventions
Adds 4 lessons learned from Phase 16 hotfix to prevent repeat issues:
- Connection keys/targets must use node names, not IDs
- Unraid GraphQL nodes must use Header Auth credential
- Node names must be unique
- Use $('Node Name') after GraphQL chains, not $input.item.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:32:59 -05:00
Lucas Berger d5bc0be2fe docs(16-06): add critical lessons from hotfix to gap closure plan
Incorporates 5 lessons from commit 216f3a4 into the plan:
- Connection keys/targets must use node names, not IDs
- HTTP auth must use Header Auth credential, not manual env vars
- Node names must be unique
- Use $('Node Name') after GraphQL chains, not $input.item.json
- Added validation checklist to verification section

Marks Task 2 as already completed (dead code removal done in hotfix).
Updates node counts from 193 to 181 baseline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:31:53 -05:00
Lucas Berger 216f3a406a fix(16): repair broken connections, auth credentials, and dead code across 4 workflows
Phase 16 plans 16-02 through 16-05 introduced three classes of defects:

1. Connection keys used node IDs instead of node names (33 broken links
   across n8n-workflow.json, n8n-batch-ui.json, n8n-actions.json)
2. GraphQL HTTP nodes used $env.UNRAID_API_KEY manual headers instead of
   Header Auth credential, causing CSRF/UNAUTHENTICATED errors (20 nodes)
3. Duplicate node name "Execute Batch Update" (serial vs parallel paths)

Also fixes Build Cancel Return Submenu using $input.item.json instead of
$('Prepare Cancel From Confirm').item.json after GraphQL query chain.

Removes 12 dead/orphan nodes (6 pre-migration dead code chains,
6 unused utility templates). Node count: 193 -> 181.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:29:40 -05:00
Lucas Berger c002ba8fd9 docs(16): add Phase 16 verification report with gap analysis
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:06:28 -05:00
Lucas Berger afda21cf3e docs(16-api-migration): create gap closure plan 16-06 2026-02-09 11:01:59 -05:00
Lucas Berger 93c74f9956 docs(16-05): complete main workflow GraphQL migration plan
Phase 16-05 SUMMARY:
- Task 1: Migrated 6 Docker API queries to Unraid GraphQL (GET → POST, added 12 nodes)
- Task 2: Analyzed callback data encoding (names used, token encoding unnecessary)
- Task 3: Implemented hybrid batch update (parallel for <=5, serial for >5 containers)

Updated STATE.md:
- Phase 16 marked complete (5/5 plans)
- Progress: 70% complete (7/10 plans in v1.4)
- Updated metrics: 57 plans total, 26 minutes for v1.4
- Added 3 key decisions from Phase 16-05
- Updated session info and next steps (Phase 17 ready)

Phase 16 API Migration complete. All workflows migrated to Unraid GraphQL API.
2026-02-09 10:39:31 -05:00
Lucas Berger 9f6752720b feat(16-05): implement hybrid batch update with updateContainers mutation
- Added IF node to check batch size (threshold: 5 containers)
- Small batches (<=5): use single updateContainers mutation (parallel, fast)
- Large batches (>5): use existing serial Execute Workflow loop
- Build Batch Update Mutation node constructs updateContainers GraphQL query
- Execute Batch Update with 120-second timeout for large image pulls
- Handle Batch Update Response maps results and updates Container ID Registry
- Format and send batch result via Telegram
- Both paths produce consistent result messaging

Workflow pushed to n8n successfully (HTTP 200).
2026-02-09 10:37:05 -05:00
Lucas Berger ed1a114d74 feat(16-05): replace 6 Docker API queries with Unraid GraphQL
- Migrated Get Container For Action to GraphQL
- Migrated Get Container For Cancel to GraphQL
- Migrated Get All Containers For Update All to GraphQL (with imageId)
- Migrated Fetch Containers For Update All Exec to GraphQL (with imageId)
- Migrated Get Container For Callback Update to GraphQL
- Migrated Fetch Containers For Bitmap Stop to GraphQL

Added 6 GraphQL Response Normalizer nodes and 6 Container ID Registry update nodes.
All nodes use $env.UNRAID_HOST and $env.UNRAID_API_KEY for authentication.
15-second timeout for myunraid.net cloud relay.
Workflow pushed to n8n successfully (HTTP 200).
2026-02-09 10:34:20 -05:00
Lucas Berger 0610f05dc8 docs(16-02): complete Container Actions GraphQL Migration plan
- Container lifecycle operations (start/stop/restart) migrated to Unraid GraphQL
- Restart implemented as sequential stop+start chain
- ALREADY_IN_STATE errors map to HTTP 304
- Format Result nodes unchanged (zero-change migration)
- Duration: 3 minutes (2 tasks, 1 file, 2 commits)
2026-02-09 10:26:16 -05:00
Lucas Berger 50326b9ed7 docs(16-03): complete Container Update GraphQL migration
- SUMMARY.md documents single updateContainer mutation replacing 5-step Docker flow
- Workflow reduced from 34 to 29 nodes (15% reduction)
- 60-second timeout accommodates large image pulls
- ImageId comparison determines update success
- Zero Docker socket proxy references remaining
- STATE.md updated: Phase 16 now 3/5 plans complete (60%)
2026-02-09 10:25:59 -05:00
Lucas Berger bb3200f246 docs(16-01): complete Container Status migration plan
- SUMMARY: Container status queries migrated to Unraid GraphQL API
- STATE: Phase 16 progress updated (2/5 plans complete)
- Metrics: 2 minutes, 1 task, 1 file modified (n8n-status.json)
- Decisions: Inline Code nodes for normalizers, same query for all paths, registry update on every query
- Next: Plans 16-02, 16-03, 16-05 remaining
2026-02-09 10:24:59 -05:00
Lucas Berger 8e8a5f9dc3 docs(16-04): complete Batch UI GraphQL migration plan
- Created 16-04-SUMMARY.md with full execution details
- Updated STATE.md: Phase 16 in progress (1/5 plans)
- Recorded decisions: 5 normalizer nodes, 15s timeout
- Updated progress: v1.4 now 30% complete (3/10 plans)
2026-02-09 10:24:47 -05:00
Lucas Berger a1c0ce25cc feat(16-02): replace start/stop/restart with GraphQL mutations
- Add Build Start/Stop Mutation Code nodes to construct GraphQL queries
- Update Start/Stop Container HTTP nodes to POST to Unraid GraphQL API
- Add GraphQL Error Handler nodes after each mutation (maps ALREADY_IN_STATE to 304)
- Implement restart as sequential stop+start chain (no native restart mutation)
- Add Handle Stop-for-Restart Result node to tolerate 304 on stop step
- Wire: Route Action -> Build Mutation -> HTTP -> Error Handler -> Format Result
- Format Result nodes unchanged (zero-change migration for output formatting)
- Workflow pushed to n8n: HTTP 200
2026-02-09 10:23:37 -05:00
Lucas Berger 6caa0f171f feat(16-03): replace 5-step Docker update with single updateContainer GraphQL mutation
- Replace Docker API container lookup with GraphQL containers query
- Add GraphQL Response Normalizer and Container ID Registry update
- Replace 5-step update flow (stop/remove/create/start) with single updateContainer mutation
- 60-second timeout for large image pulls (was 600s for docker pull)
- ImageId comparison determines update success (not digest comparison)
- Preserve all 15 messaging nodes (Format/Check/Send/Return)
- Remove Docker socket proxy dependencies (zero references)
- Remove Execute Command node (docker pull eliminated)
- Reduce from 34 to 29 nodes (~15% reduction)
2026-02-09 10:23:29 -05:00
Lucas Berger 1f6de5542a feat(16-01): migrate container status queries to Unraid GraphQL API
- Replace 3 Docker API GET queries with Unraid GraphQL POST queries
- Add GraphQL Response Normalizer after each query (transforms Unraid format to Docker contract)
- Add Container ID Registry update after each normalizer (keeps name-to-PrefixedID mapping fresh)
- Rename HTTP Request nodes: Docker List → Query Containers, Docker Get → Query Container Status
- Wire pattern: HTTP Request → Normalizer → Registry Update → existing Code node
- Downstream Code nodes unchanged (Build Container List, Build Container Submenu, Build Paginated List)
- GraphQL query: docker.containers {id, names, state, image, status}
- State mapping: RUNNING→running, STOPPED→exited, PAUSED→paused
- Authentication: n8n Header Auth credential "Unraid API Key"
- Timeout: 15s for myunraid.net cloud relay
- Workflow nodes: 11 → 17 (added 3 normalizers + 3 registry updates)
2026-02-09 10:23:07 -05:00
Lucas Berger 73a01b6126 feat(16-04): migrate Batch UI to Unraid GraphQL API
- Replace all 5 Docker API HTTP Request nodes with GraphQL queries
- Add 5 GraphQL Response Normalizer nodes (one per query path)
- Transform Unraid GraphQL responses to Docker API contract format
- Preserve all downstream Code nodes unchanged (bitmap encoding, keyboard building)
- All connection chains validated and working
- Pushed to n8n successfully (HTTP 200)
2026-02-09 10:22:48 -05:00
Lucas Berger abb98c0186 feat(16-02): replace container lookup with Unraid GraphQL API
- Replace 'Get All Containers' Docker API call with GraphQL query
- Add GraphQL Response Normalizer to transform Unraid format to Docker contract
- Add Container ID Registry update on every container lookup
- Update Resolve Container ID to output unraidId (PrefixedID) for mutations
- Wire: Query All Containers -> Normalizer -> Registry Update -> Resolve Container ID
2026-02-09 10:21:50 -05:00
Lucas Berger f84d433b25 fix(16): revise plans based on checker feedback 2026-02-09 09:25:17 -05:00
Lucas Berger 4fc791dd43 docs(16): create API migration phase plans (5 plans in 2 waves) 2026-02-09 09:19:10 -05:00
Lucas Berger 5880dc4573 docs(16): research Unraid GraphQL API migration patterns 2026-02-09 09:10:14 -05:00
Lucas Berger 6d5b407a8e docs(phase-15): complete phase execution 2026-02-09 09:00:37 -05:00
Lucas Berger 4e29bdeb56 docs(15-01): complete Container ID Registry and Callback Token Encoding plan
- Added 15-01-SUMMARY.md documenting implementation and deviations
- Updated STATE.md: Phase 15 complete (2/2 plans), 52 total plans, v1.4 at 20%
- Task 1 (Container ID Registry) was pre-existing in baseline
- Task 2 (Token Encoder/Decoder) implemented and pushed to n8n
- All utility nodes standalone, ready for Phase 16 wiring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 08:56:03 -05:00
Lucas Berger d25fc1b13f docs(15-02): complete GraphQL utility nodes plan 2026-02-09 08:55:01 -05:00
Lucas Berger 1b61343528 feat(15-01): add Callback Token Encoder and Decoder utility nodes
- Callback Token Encoder: compress 129-char Unraid PrefixedID to 8-char hex token
- SHA-256 hashing with 7-window collision detection (56 chars / 8-char windows)
- Callback Token Decoder: resolve 8-char token back to PrefixedID
- Both use JSON serialization for static data persistence (_callbackTokens)
- Standalone utility nodes at [600,2400] and [1000,2400]
- Not connected - Phase 16 will wire into active flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 08:53:38 -05:00
Lucas Berger e6ac219212 feat(15-02): add GraphQL Error Handler and HTTP Template utility nodes
- GraphQL Error Handler maps ALREADY_IN_STATE to HTTP 304 (matches Docker API pattern)
- Handles NOT_FOUND, FORBIDDEN, UNAUTHORIZED error codes
- HTTP Template pre-configured with 15s timeout for myunraid.net cloud relay
- Environment variable auth (UNRAID_HOST, UNRAID_API_KEY headers)
- continueRegularOutput error handling for downstream processing
- Standalone utility nodes at [600,2600] and [1000,2600] for Phase 16 wiring
- Fix: removed invalid notesDisplayMode from Container ID Registry
2026-02-09 08:52:23 -05:00
Lucas Berger 1b4b596e05 feat(15-02): add GraphQL Response Normalizer utility node
- Transforms Unraid GraphQL response to Docker API contract
- Maps id->Id, state (UPPERCASE)->State (lowercase), names->Names
- STOPPED->exited conversion (Docker convention)
- Validates response.errors[] and data.docker.containers structure
- Standalone utility node at [200, 2600] for Phase 16 wiring
2026-02-09 08:47:58 -05:00
Lucas Berger a352b15954 docs(15): create phase plan — 2 plans for infrastructure foundation 2026-02-09 08:42:39 -05:00
Lucas Berger 62eaa4b1ec docs(15): research infrastructure foundation domain 2026-02-09 08:36:44 -05:00
Lucas Berger 16034bbdb8 docs: create milestone v1.4 roadmap (4 phases)
Phases 15-18: Infrastructure Foundation, API Migration, Cleanup, Documentation
23 requirements mapped across 4 phases with 0 gaps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 08:29:16 -05:00
Lucas Berger 7eab41eaba docs: define milestone v1.4 requirements 2026-02-09 08:11:54 -05:00
Lucas Berger bab819f6c8 docs: complete v1.4 project research synthesis 2026-02-09 08:08:25 -05:00
Lucas Berger bb47664188 docs: start milestone v1.4 Unraid API Native 2026-02-09 07:52:53 -05:00
Lucas Berger 903e73d616 feat: v1.3 Unraid Update Status Sync
Unraid GraphQL API foundation — connectivity, authentication, and
container ID format verified for native Unraid API integration.

Phase 14: Unraid API Access (2 plans, 4 tasks)
- Established Unraid GraphQL API connectivity via myunraid.net cloud relay
- Dual credential storage (.env.unraid-api + n8n env vars)
- Container ID format: {server_hash}:{container_hash} (128-char SHA256 pair)
- Complete API contract documented in ARCHITECTURE.md
- "unraid" test command added to Telegram bot

Phases 15-16 dropped (superseded by v1.4 Unraid API Native).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 07:47:31 -05:00
Lucas Berger ff0773b84b docs(14): create phase plan 2026-02-08 20:22:11 -05:00
Lucas Berger 00f0dcfd21 docs(14): research Unraid GraphQL API access patterns 2026-02-08 20:16:06 -05:00
Lucas Berger 9385deb0da docs(14): capture phase context 2026-02-08 20:10:58 -05:00
Lucas Berger be66f01815 chore: persist research preference in config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:02:00 -05:00
Lucas Berger 96c293f8f4 docs: create milestone v1.3 roadmap (3 phases) 2026-02-08 20:01:15 -05:00
Lucas Berger 59a97d1847 docs: define milestone v1.3 requirements 2026-02-08 19:57:10 -05:00
Lucas Berger 07cde0490a docs: complete v1.3 project research (STACK, FEATURES, ARCHITECTURE, PITFALLS, SUMMARY) 2026-02-08 19:52:57 -05:00
Lucas Berger c071b890ef docs: start milestone v1.3 Unraid Update Status Sync 2026-02-08 19:35:46 -05:00
Lucas Berger 1e84472efd chore: set git branching strategy to per-milestone
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:26:28 -05:00