Repository navigation
fix(tests): isolate loader test from the machine's global links - #279
Merged
Merged
Conversation
1 task
Contributor
Author
|
Independent review of
|
The Project Direction loader test isolated Codex and Grok homes but not Claude, OpenCode or Muse, so on a machine with a real Muse link and PREFERENCES.md the muse subtest crossed the 16,384-byte stdout limit and reported that limit instead of the 10,000-byte one. Closes #277. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lukemaj
force-pushed
the
fix/277-muse-loader-limit-test
branch
from
November 23, 2026 16:17
2ecc420 to
c7960c0
Compare
Contributor
Author
|
Independent review, round 2, of
|
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.
What changed: The Project Direction loader test now isolates the Claude, OpenCode and Muse global-link locations, as it already did for Codex and Grok, so the muse subtest passes on every machine.
Why: The test read the machine's real
~/.config/muse/AGENTS.mdlink and realPREFERENCES.md; on a maintainer machine that pushed muse's encoded stdout to 16,595 bytes, over Muse's 16,384-byte limit, so the hook correctly reported that limit instead of the 10,000-byte one the test expects.So what: Rebased on main after #278 merged and re-bumped to 17.6.2; independent review runs on this head; the user decides the merge.
Closes #277
Diagnosis
Neither side was stale. Both limits are real and current since #228 (
47e6ac5):MAX_CONTEXT_BYTES = 10000for every host, plus a 16,384-byte stdout ceiling for Muse (bin/project-directionhook_output, documented indocs/musecode.md). When both are exceeded the hook names the stdout limit, which is correct.The defect was test isolation.
invoke()setCODEX_HOMEandGROK_HOMEto fixture paths but leftCLAUDE_CONFIG_DIR,OPENCODE_CONFIG_DIRandXDG_CONFIG_HOMEresolving to the real machine. Probe onorigin/mainwith the same fixture:~/.claude/CLAUDE.md+ real preferences~/.config/muse/AGENTS.md+ real preferencesOn a machine without those links (CI) the muse output stays under 16,384 and the test passes, which is why it is red only locally.
Changes
tests/test_project_direction_loader.pyinvoke(): setCLAUDE_CONFIG_DIR,OPENCODE_CONFIG_DIR,XDG_CONFIG_HOMEto fixture paths. No hook or limit changes. Muse's stdout-limit branch stays covered bytests/test_muse.py.versionctl prepare, on main8e1eb30(after fix(orchestration): accept user authority relayed by the parent #278).Proof
origin/main(77d76de):'10,000-byte' not found in 'The encoded hook output has 16,595 UTF-8 bytes, over the 16,384-byte stdout limit...'.c7960c0:python3 -m unittest discover -s tests -p 'test_*.py': 515 OK.bin/versionctl release-check:release candidate OK: v17.6.2 at c7960c0.2ecc420(17.6.1) passed independent review; this head needs its own review.Elon record
origin/main, probed per-host sizes and instruction targets, ran the full suite and release-check on this head.Website impact: none (test-only change; no public content).
🤖 Generated with Claude Code