fix(install): bridge system/ → .hex/ for v0.16+ binary; revert premature .legacy rename#6
Open
arrra wants to merge 1 commit into
Open
Conversation
…ure .legacy rename
The v0.16.0 release ("Real-port phase complete") renamed three actively-used
scripts to `.legacy` AND assumes a layout the install.sh does not produce.
Two separate bugs in one release:
1. **Layout mismatch.** The Rust `hex` binary has hardcoded path constants
that prefix `system/skills/...` and `system/scripts/...` (verified via
`strings system/scripts/bin/hex`). install.sh copies foundation's
`system/*` to `$TARGET_DIR/.hex/*` and never creates a `system/` entry
at the install root — so `hex memory index/search`, `hex doctor`, and
`hex integration` all fail with `No such file or directory` on a fresh
install. Add `ln -sfn .hex "$TARGET_DIR/system"` alongside the existing
`.agents/skills → .hex/skills` symlink. Same pattern, additive fix.
2. **Premature `.legacy` quarantine.** memory_index, memory_search, and
startup are not legacy — they are still invoked at runtime:
- `hex memory index|search` shells out to memory_index.py/memory_search.py
(the Rust subcommand is a wrapper, not a port).
- SKILL.md (Memory System section) and the foundation CLAUDE.md memory
instructions both reference the non-`.legacy` paths.
- hex-startup SKILL.md runs `.hex/scripts/startup.sh`.
Rename them back to canonical names so existing tooling and the binary
both find them.
Verified on a real install (Sagar's hex instance): with this branch applied
locally via symlinks, `hex memory index` indexes 327 files cleanly,
`hex doctor --smoke` runs to completion, and `startup.sh` is resolvable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v0.16.0 release ("Real-port phase complete") introduced two regressions that break a fresh install:
hexbinary has hardcoded path constants that prefixsystem/skills/...andsystem/scripts/...(verified viastrings system/scripts/bin/hex). Butinstall.shcopies foundation'ssystem/*into\$TARGET_DIR/.hex/*and never creates asystem/entry at the install root — sohex memory index/search,hex doctor, andhex integrationall fail on a fresh install with:.legacyquarantine.memory_index,memory_search, andstartupwere renamed to.legacy.*but they are still invoked at runtime:hex memory index|searchshells out tomemory_index.py/memory_search.py(Rust subcommand is a wrapper, not a port).CLAUDE.mdandsystem/skills/memory/SKILL.mdboth still document the non-.legacypaths.system/skills/hex-startup/SKILL.mdruns\$HEX_DIR/.hex/scripts/startup.sh.Changes
install.sh: addln -sfn .hex \"\$TARGET_DIR/system\"alongside the existing.agents/skills → .hex/skillssymlink. Same pattern, additive fix.system/skills/memory/scripts/memory_index.legacy.py→memory_index.pysystem/skills/memory/scripts/memory_search.legacy.py→memory_search.pysystem/scripts/startup.legacy.sh→startup.shTotal: 4 files changed, 7 insertions(+).
Test plan
Verified on a real install (workspace at `/Users/sagarsingh/hex`, hex 0.8.0 commit
9412f85):hex memory index,hex doctor --smoke, missingstartup.sh) before applying the fixhex memory index→Done in 0.02s: 0 indexed, 327 unchanged, 0 removedhex doctor --smoke --quiet→ runs to completion (1 unrelated warning)which hex→ resolves via\$HEX_DIR/.hex/bin/hexbash \$HEX_DIR/.hex/scripts/startup.sh→ runs the legacy script transparentlybash install.sh /tmp/hex-teston a clean dir to verify install lays out correctlycd /tmp/hex-test && \$PWD/.hex/bin/hex memory indexto verify the binary resolves the new symlinkNotes
/hex-upgradethen/hex-startuppost-v0.16.0 upgrade. Standing Order S1 ("sync fixes to hex base") motivated upstreaming..hex/...(correct but requires re-release).install.shto copysystem/*to\$TARGET_DIR/system/*instead of.hex/*(more invasive — breaks every existing instance's directory expectations)..agents/skillspattern and is fully reversible.🤖 Generated with Claude Code