Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

fix(api): standardize work submission response field naming#1

Merged
mdlopresti merged 2 commits intomainfrom
fix/api-field-naming
Dec 18, 2025
Merged

fix(api): standardize work submission response field naming#1
mdlopresti merged 2 commits intomainfrom
fix/api-field-naming

Conversation

@mdlopresti
Copy link
Copy Markdown
Member

Summary

Adds standard id field to WorkSubmitResponse while maintaining backward compatibility with workItemId. This resolves the API field naming inconsistency identified in integration testing.

Changes

  • ✅ Add id field as the primary work item identifier
  • ✅ Keep workItemId field with @deprecated annotation
  • ✅ Update coordinator to return both fields in response
  • ✅ No breaking changes - existing clients using workItemId continue to work

Testing

Integration Tests:PASSING

  • REQ-ROUTE-001: Work submission with both fields verified
  • All 5 routing tests passing (100%)

Unit Tests:

  • ✅ Build successful
  • ✅ All 72 tests pass
  • ✅ TypeScript type checking passes

API Response Example

{
  "id": "f01434ce-4db6-4be6-8827-cdeb1204a8c8",
  "workItemId": "f01434ce-4db6-4be6-8827-cdeb1204a8c8",
  "targetAgentType": "claude-code",
  "spinUpTriggered": true,
  "estimatedWaitSeconds": 30
}

Related Issues

  • Fixes REQ-ROUTE-001 from test-scenarios/WEFT-INTEGRATION-TEST-SUMMARY.md
  • Priority: P2 - Documentation/consistency improvement

Migration Path

For API consumers:

  • Immediate: Both fields available - no changes required
  • Short term: Update to use id instead of workItemId
  • Future: workItemId may be removed in future major version

Files Changed

  • shared/src/types/work-item.ts (+3 lines)
  • weft/src/coordinator/coordinator.ts (+1 line)

Michael LoPresti added 2 commits December 18, 2025 07:43
Add standard 'id' field to WorkSubmitResponse while maintaining
backward compatibility with 'workItemId'. This resolves the API
field naming inconsistency identified in integration testing.

Changes:
- Add 'id' field as the primary work item identifier
- Keep 'workItemId' field with @deprecated annotation
- Update coordinator to return both fields in response
- No breaking changes - existing clients using 'workItemId' continue to work

Related: test-scenarios/WEFT-INTEGRATION-TEST-SUMMARY.md (REQ-ROUTE-001)
Priority: P2 - Documentation/consistency improvement

Verified:
- All existing tests pass (72 tests)
- TypeScript type checking passes
- Build succeeds
Use correct package names @loominal/shared and @loominal/weft
instead of @loom/shared and @loom/weft in pnpm filter commands.

This fixes the docker-weft CI build failure where dist directories
were not being created because the build commands were not matching
any packages.
@mdlopresti mdlopresti merged commit 8a5be96 into main Dec 18, 2025
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant