fix: preserve file paths through make slug #291

Merged
erik merged 1 commit from fix/task-1f61c12c-make-slug-paths into main 2026-10-04 17:18:03 -05:00
Owner

Summary

  • Replace one Makefile recipe line: run node ./cli/dist/index.js directly after the existing CLI build, preserving the repository working directory.
  • Quote DEV_CONFIG and DEV_SITE; leave shell-quoted ARGS intact. Config paths remain relative to the unchanged repository root or absolute when supplied.
  • Add a short README explanation and examples for relative paths and space-containing arguments.

Verification

  • Reproduced the original wrapper failure with temporary files and a file-reading CLI stand-in: relative media/Markdown paths failed from the CLI workspace, and the old unquoted config path split.
  • Six focused local-only wrapper checks now pass: media upload and post import with relative, absolute and space-containing paths, exact file contents/arguments, a repository directory containing spaces, and a config path containing spaces. No API calls or real uploads.
  • Added a lightweight static unit regression for direct CLI invocation and config/site quoting.
  • ./scripts/pre-pr.sh passed: CSS, formatting, lint, type checks and 1,084 local tests.
  • npm run test:ci passed; it excludes make-slug.integration.test.ts (497 CLI unit tests versus 503 in the local full suite).
  • git diff --check passed.

Actual Make/npm/file execution checks are named *.integration.test.ts and remain LOCAL ONLY. CI and release workflows are unchanged; no integration tests, new tooling, dependencies or runtime setup added to CI.

Task: #task-1f61c12c

Awaiting CI, independent review and explicit human merge approval.

## Summary - Replace one Makefile recipe line: run node ./cli/dist/index.js directly after the existing CLI build, preserving the repository working directory. - Quote DEV_CONFIG and DEV_SITE; leave shell-quoted ARGS intact. Config paths remain relative to the unchanged repository root or absolute when supplied. - Add a short README explanation and examples for relative paths and space-containing arguments. ## Verification - Reproduced the original wrapper failure with temporary files and a file-reading CLI stand-in: relative media/Markdown paths failed from the CLI workspace, and the old unquoted config path split. - Six focused local-only wrapper checks now pass: media upload and post import with relative, absolute and space-containing paths, exact file contents/arguments, a repository directory containing spaces, and a config path containing spaces. No API calls or real uploads. - Added a lightweight static unit regression for direct CLI invocation and config/site quoting. - ./scripts/pre-pr.sh passed: CSS, formatting, lint, type checks and 1,084 local tests. - npm run test:ci passed; it excludes make-slug.integration.test.ts (497 CLI unit tests versus 503 in the local full suite). - git diff --check passed. Actual Make/npm/file execution checks are named *.integration.test.ts and remain LOCAL ONLY. CI and release workflows are unchanged; no integration tests, new tooling, dependencies or runtime setup added to CI. Task: #task-1f61c12c Awaiting CI, independent review and explicit human merge approval.
fix: preserve repository-relative paths through make slug
All checks were successful
CI / build-lint-test (pull_request) Successful in 56s
05aabb6a2a
Run the built CLI directly so npm workspace execution cannot change its working directory. Quote config/site values, document argument quoting, and keep actual wrapper/file regressions local-only.

Task: #task-1f61c12c
Author
Owner

Independent PR review

Summary

  • Reviewed Forgejo PR #291 for task task-1f61c12c against the six task acceptance criteria.
  • The Makefile change preserves repository-root execution by running the built CLI directly after the existing workspace build, while quoting DEV_CONFIG and DEV_SITE and leaving user-provided ARGS shell quoting intact.
  • The added fixtures are local-only *.integration.test.ts checks and test:ci continues to exclude them.

Acceptance criteria

  • Repository-relative media paths work through make slug — the wrapper now runs from the repository root, and the media-upload fixture verifies cwd, exact args, and file content for relative paths.
  • Repository-relative Markdown import paths work through make slug — the post-import fixture verifies cwd, exact args, and file content for relative paths.
  • Absolute paths continue to work — both media upload and post import are covered with absolute file paths.
  • Paths containing spaces are handled safely — fixtures cover a repository path with spaces, file paths with spaces, and a config path with spaces; DEV_CONFIG/DEV_SITE are quoted while quoted ARGS are preserved.
  • Verification covers the wrapper's effective working directory and file argument behavior — the CLI stand-in reports process.cwd(), argv, and read file content for all six wrapper executions.
  • Makefile help or developer documentation explains path resolution — README now states repo-root resolution, absolute path behavior, and quoting guidance with examples.

Blocking issues

  • None.

Warnings

  • None.

Evidence reviewed

  • Commit: 05aabb6a2a
  • CI: Forgejo Actions run #493 build-lint-test success
  • Local artifacts: /tmp/slugkit-make-paths-red.log, /tmp/slugkit-make-paths-green.log, /tmp/slugkit-make-paths-pre-pr.log, /tmp/slugkit-make-paths-unit-ci.log

Final verdict

Approved. No blocking issues or warnings found.

### Independent PR review #### Summary - Reviewed Forgejo PR #291 for task `task-1f61c12c` against the six task acceptance criteria. - The Makefile change preserves repository-root execution by running the built CLI directly after the existing workspace build, while quoting `DEV_CONFIG` and `DEV_SITE` and leaving user-provided `ARGS` shell quoting intact. - The added fixtures are local-only `*.integration.test.ts` checks and `test:ci` continues to exclude them. #### Acceptance criteria - [x] Repository-relative media paths work through `make slug` — the wrapper now runs from the repository root, and the media-upload fixture verifies cwd, exact args, and file content for relative paths. - [x] Repository-relative Markdown import paths work through `make slug` — the post-import fixture verifies cwd, exact args, and file content for relative paths. - [x] Absolute paths continue to work — both media upload and post import are covered with absolute file paths. - [x] Paths containing spaces are handled safely — fixtures cover a repository path with spaces, file paths with spaces, and a config path with spaces; `DEV_CONFIG`/`DEV_SITE` are quoted while quoted `ARGS` are preserved. - [x] Verification covers the wrapper's effective working directory and file argument behavior — the CLI stand-in reports `process.cwd()`, argv, and read file content for all six wrapper executions. - [x] Makefile help or developer documentation explains path resolution — README now states repo-root resolution, absolute path behavior, and quoting guidance with examples. #### Blocking issues - None. #### Warnings - None. #### Evidence reviewed - Commit: `05aabb6a2a` - CI: Forgejo Actions run `#493` `build-lint-test` success - Local artifacts: `/tmp/slugkit-make-paths-red.log`, `/tmp/slugkit-make-paths-green.log`, `/tmp/slugkit-make-paths-pre-pr.log`, `/tmp/slugkit-make-paths-unit-ci.log` #### Final verdict Approved. No blocking issues or warnings found.
erik merged commit 1ddd37c534 into main 2026-10-04 17:18:03 -05:00
erik deleted branch fix/task-1f61c12c-make-slug-paths 2026-10-04 17:18:03 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit!291
No description provided.