Repository navigation
Conversation
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:624def25-042b-4225-858e-e20d25f2667f
✅ Heimdall Review Status
|
|
Validation: all 267 tests, lint, TypeScript, and formatting passed locally; the change matches CHAIN-6509. The fixture-backed tests check the Reviewed e64f906: no remaining approval-blocking findings and relevant code/test CI is passing. @leopoldjoy approves based on this delegated review and will add a +1 when online. Posted by local automation on behalf of @leopoldjoy; the GitHub approval has not yet been submitted. |
| return NextResponse.json({ success: true }, { status: 200 }); | ||
| } catch (error) { | ||
| if (error instanceof TaskCatalogError) { | ||
| const statuses: Partial<Record<TaskCatalogError['kind'], number>> = { |
There was a problem hiding this comment.
This map duplicates TASK_CATALOG_ERROR_STATUS, which #239 adds to task-catalog.ts for this route to reuse. Both PRs branch from main and merge without conflict, so once both land the catalog's kind-to-status mapping lives in two places and can drift. Use TASK_CATALOG_ERROR_STATUS here once #239 lands (the "unmapped catalog kind" test then expects 422 for invalid-profile).
There was a problem hiding this comment.
0xth4nh
left a comment
There was a problem hiding this comment.
Looks good to Thanh's Toshi
…-task-catalog J-Engine-Session: toshi:624def25-042b-4225-858e-e20d25f2667f
J-Engine-Session: toshi:624def25-042b-4225-858e-e20d25f2667f
|
The author's switch to the canonical status table fixes the duplicated mapping, including the 422 regression case. Validation: all 284 tests, production build, lint, TypeScript, and formatting pass. The build passed on retry after an existing Next.js cache-advisory reminder; the affected cache APIs are unused in application source. The unchanged dependency still needs a separate upgrade. No live dependency installation was run. Reviewed 8de64cb: no remaining approval-blocking findings and relevant code/test CI is passing. @leopoldjoy approves based on this delegated review and will add a +1 when online. Posted by local automation on behalf of @leopoldjoy; the GitHub approval has not yet been submitted. |
0xth4nh
left a comment
There was a problem hiding this comment.
Looks good to Thanh's Toshi
What changed? Why?
The dependency-install route now gets the Task folder from the Task catalog instead of building paths and running its own id and path checks. Task folder layout and path safety now live only in the catalog. The catalog's
taskDirsalso throwsnot-foundwhen the Task folder is missing, and the route maps catalog error kinds through the sharedTASK_CATALOG_ERROR_STATUStable from #239.Notes to reviewers
src/app/api/install-deps/route.ts, then the six added lines insrc/lib/task-catalog.ts.Invalid Task id or network: <id>).taskDirmust exist fortaskDirs. Signature and task-origin folders are still not checked. The private helper behind Task listing is unchanged.git revertundoes it. Blast radius: the install-deps route and futuretaskDirscallers.How has it been tested?
Route tests now run the real catalog over a temp fixture root, with only
child_process.execmocked. Each of these was written first and seen failing:taskDirson a missing Task: did not throw, now throwsnot-foundmake TASK_NETWORK=zeronet depsin the Task foldernpx tsc --noEmit, eslint, and prettier pass on the changed files.