Skip to content

Step 9 cleanup aborts under fish/zsh on pure-code corpora (unmatched glob leaves temp files) #1172

Closed

Description

@dispather

Summary

The Step 9 cleanup line in the generated skill uses an unquoted glob graphify-out/.graphify_chunk_*.json. For a pure-code corpus (no docs/images), Part B (semantic chunking) is skipped, so no .graphify_chunk_*.json files are ever created. Under fish/zsh (which error on an unmatched glob by default), the unmatched glob aborts the entire rm line, so none of the preceding temp files get removed.

Affected

graphify/skill.md Step 9 (and the generated variants graphify/skill-*.md, tools/skillgen/expected/graphify__skill*.md):

rm -f graphify-out/.graphify_detect.json graphify-out/.graphify_extract.json graphify-out/.graphify_ast.json graphify-out/.graphify_semantic.json graphify-out/.graphify_analysis.json graphify-out/.graphify_chunk_*.json

Reproduction

  1. Run graphify on a pure-code corpus (no docs/images) so Part B is skipped → no .graphify_chunk_*.json on disk.
  2. Use fish (or zsh with default nomatch).
  3. Step 9 cleanup runs → no matches found: graphify-out/.graphify_chunk_*.json → the whole line aborts.
  4. .graphify_detect.json, .graphify_extract.json, .graphify_ast.json, .graphify_semantic.json, .graphify_analysis.json all remain on disk.

Behavior by shell

  • bash: an unmatched glob passes through literally and rm -f ignores it → fine.
  • fish / zsh (nomatch): the command aborts before deleting anything → preceding temp files leak.

Suggested fix

Separate the glob from the explicit rm -f, and delete chunk files shell-independently:

rm -f graphify-out/.graphify_detect.json graphify-out/.graphify_extract.json graphify-out/.graphify_ast.json graphify-out/.graphify_semantic.json graphify-out/.graphify_analysis.json
find graphify-out -maxdepth 1 -name '.graphify_chunk_*.json' -delete 2>/dev/null

Since skill.md is generated, the fix belongs in the skillgen fragment/source so it propagates to all assistant variants and the expected/ golden tests.

Environment

  • graphify: PyPI graphifyy, 0.8.x
  • shell: fish
  • corpus: pure TS/Python code, no docs/images (Part B skipped)

Activity

  1. safishamsi commented on Jun 7, 2026

    @safishamsi
    Member

    Fixed in 6a549e4. Step 9 cleanup split into rm -f for fixed filenames and find -maxdepth 1 -delete for the chunk glob. Fixed in the three skillgen source fragments and regenerated across all 15 skill variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions