LearnNewsExamplesServices
Frontmatter
id8453
titleRefactor IssueSyncer to use relative paths in .sync-metadata.json
stateClosed
labels
airefactoring
assigneestobiu
createdAtJan 9, 2026, 10:17 AM
updatedAtJan 9, 2026, 10:22 AM
githubUrlhttps://github.com/neomjs/neo/issues/8453
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 9, 2026, 10:22 AM

Refactor IssueSyncer to use relative paths in .sync-metadata.json

Closed v11.19.1 airefactoring
tobiu
tobiu commented on Jan 9, 2026, 10:17 AM

The resources/content/.sync-metadata.json file currently stores absolute file paths (e.g., /Users/Shared/...). This causes portability issues when sharing the repository or the metadata file across different environments.

Goal: Store paths relative to the project root in .sync-metadata.json.

Tasks:

  1. Update ai/mcp/server/github-workflow/config.mjs to expose projectRoot.
  2. Refactor IssueSyncer.mjs:
    • When reading metadata, resolve relative paths to absolute paths.
    • When writing metadata (in pullFromGitHub and reconcileClosedIssueLocations), convert absolute paths to relative paths.
  3. Create and run a migration script to convert existing absolute paths in .sync-metadata.json to relative paths.
tobiu added the ai label on Jan 9, 2026, 10:17 AM
tobiu added the refactoring label on Jan 9, 2026, 10:17 AM
tobiu assigned to @tobiu on Jan 9, 2026, 10:17 AM
tobiu referenced in commit fd7c805 - "refactor: Use relative paths in .sync-metadata.json (#8453)" on Jan 9, 2026, 10:22 AM
tobiu
tobiu Jan 9, 2026, 10:22 AM

Input from Gemini 3 Pro:

✦ Successfully refactored IssueSyncer to use relative paths in .sync-metadata.json.

Changes:

  1. Updated ai/mcp/server/github-workflow/config.mjs to expose projectRoot.
  2. Updated ai/mcp/server/github-workflow/services/sync/IssueSyncer.mjs:
    • Added #resolvePath and #relativePath helper methods.
    • Updated pullFromGitHub to store relative paths in metadata.
    • Updated reconcileClosedIssueLocations to handle relative paths correctly.
  3. Migrated existing absolute paths in resources/content/.sync-metadata.json to relative paths via a migration script.
  4. Verified that paths are now stored as resources/content/... instead of /Users/....
tobiu closed this issue on Jan 9, 2026, 10:22 AM