Skip to content

Fix skill path reads and gateway shutdown interrupts#108

Merged
SergioChan merged 1 commit intomainfrom
fix/skill-read-path-and-sigint-shutdown
Mar 12, 2026
Merged

Fix skill path reads and gateway shutdown interrupts#108
SergioChan merged 1 commit intomainfrom
fix/skill-read-path-and-sigint-shutdown

Conversation

@SergioChan
Copy link
Member

Summary

  • fix skill file reads in the pi coding backend when the model emits home-relative paths like .openpocket/skills/...
  • add a regression test for skill-root path resolution so the read flow stays pinned to the real skill location
  • let a second Ctrl+C force-exit the gateway so shutdown is no longer stuck behind slow graceful cleanup

Why

  • the gateway still failed to load x-openpocket-engagement/SKILL.md because the pi coding executor validated the corrected path but then passed the original relative path into the external read tool
  • graceful shutdown could feel hung because repeated Ctrl+C presses were ignored once the first SIGINT started async cleanup

Changes

  • move skill-root resolution ahead of the workspace-boundary fast path and add a home-directory fallback for home-relative skill reads
  • teach PiCodingToolsExecutor to pass the resolved absolute path into the pi coding read tool instead of the original user/model-supplied path
  • update the gateway run loop so the first Ctrl+C starts graceful shutdown and the second Ctrl+C forces immediate exit with a clear log message

Testing

  • npm run build
  • node --test test/tool-policy-hooks.test.mjs
  • node --test test/*.test.mjs

Checklist

  • I ran relevant tests, or the Testing section explains why I did not.
  • I updated docs, or confirmed no doc changes were needed.
  • I confirmed the PR does not include secrets, credentials, or private data.

Made with Cursor

…own.

Resolve home-relative skill reads before passing paths into the pi coding read tool, and let a second Ctrl+C force exit while graceful shutdown is in progress.

Made-with: Cursor
@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openpocket Ready Ready Preview, Comment Mar 12, 2026 5:51pm

Request Review

@SergioChan SergioChan merged commit 570b4dd into main Mar 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant