easyeda / easyeda/easyeda-api-skill

Contribution: retain long-running EDA tasks and expose routing status

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
699
Forks
60
PR merge metrics
No merged PRs in 30d

Description

This repository has pull requests disabled (`has_pull_requests: false`), so I am submitting the tested companion patch here for review.

- Commit: https://github.com/asmoyou/easyeda-api-skill/commit/2c0a8a5d805d88a6c96fef8ee71184668afdfded
- Downloadable patch: https://github.com/asmoyou/easyeda-api-skill/commit/2c0a8a5d805d88a6c96fef8ee71184668afdfded.patch
- Gateway PR: https://github.com/easyeda/eext-run-api-gateway/pull/2
- Native API bug: https://github.com/easyeda/pro-api-sdk/issues/38

The bridge deletes execution requests after a fixed 30-second wait. PCB routing
can continue inside EDA, so callers lose late results and may incorrectly repeat
an operation. The window-selection response also references an undefined
`activeWindowId` variable, causing the request to hang.

Add asynchronous `/tasks` and `/routing` submission with queryable stages,
elapsed time, bounded logs, native errors, and final results. Keep the legacy
`/execute` wait limit but return a task ID on HTTP 504 and retain late results.
Record connection loss as an unknown outcome, verify result ownership, and
preserve the original target window in responses.

Fix the window-selection response and routing documentation field names.
Describe native progress/cancellation limitations and partial routing semantics.

Validation: 13 tests covering HTTP/WebSocket behavior, a real 30-second timeout,
late results, window ownership, partial completion, disconnects, and bounded
history. `npm run test:gateway` additionally runs 21 compiled-gateway tests and
one HTTP/WebSocket integration test against the companion gateway build.
Native auto routing also passed. Native clearing still hangs in the tested client and is documented
as an unresolved upstream issue.

Native API reproduction: https://github.com/easyeda/pro-api-sdk/issues/38.
This PR retains the operation state; it does not fix or close the native clearing issue.

## Reproduce the tests

The patch includes the standalone bridge tests and the compiled-gateway integration harness.

```sh
git clone --branch feat/routing-task-observability https://github.com/asmoyou/easyeda-api-skill.git
git clone --branch feat/routing-task-observability https://github.com/asmoyou/eext-run-api-gateway.git
cd eext-run-api-gateway
npm ci
npm run lint
npx tsc --noEmit
npm run build
cd ../easyeda-api-skill
npm ci
npm test
npm run test:gateway
```

35 tests pass: 13 bridge/task tests, 21 compiled-gateway tests, and one cross-module HTTP/WebSocket test. Native auto routing was verified separately on a minimal PCB with two nets; both were routed. The separate native clearing hang remains unresolved.

The task history is bounded and in memory. Percentage progress and cancellation are not claimed, because the native routing API does not expose them.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the linked companion commit and gateway PR first, then run the standalone bridge tests and the compiled-gateway integration harness using the listed npm commands. Done means the 35 reported tests pass, long-running task and routing results remain queryable with bounded history, and the documented native clearing limitation remains explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.