Skip to content

fix(pstack): load the bundled pack after test fixtures are pruned - #51

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
fix/pstack-packaged-pack-prune
Nov 3, 2026
Merged

ScriptedAlchemy merged 2 commits into
mainfrom
fix/pstack-packaged-pack-prune

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Problem

Packaged desktop builds never load the bundled pstack skill pack. The server logs PstackPackError: Unable to materialize the pstack pack with an ENOENT for upstream/skills/statechart/scripts/test/ConfigOracle.java, so PstackPack.catalog returns nothing, ServerConfig.pstackSkills is never sent, and the composer offers no /pstack:* skills even with the setting enabled.

The build step prunePackagedPstackTestFixtures deletes skills/statechart/scripts/test/ from the packaged resources, but pstackPackEntries still copies every file in UPSTREAM.json, including those 376 fixtures. Dev checkouts have the files, so only packaged builds break.

Fix

Define the pruned directory once as PSTACK_PACKAGED_PRUNED_DIR in @t3tools/pstack. isRuntimePackFile skips paths under it, and the build prune step derives its target from the same constant, so the two can no longer drift.

Tests: a check.test.ts case seals a fixture pack, deletes the test corpus, and asserts every remaining entry exists on disk. The build-artifact Windows payload test now also asserts every pstackPackEntries source path survives pruning. Both failed before the fix.

Implemented by Claude Opus 5.5, reviewed by Grok 4.6 and DeepSeek V4.1 Flash, orchestrated by Claude Fable 5.1 via T3 Code.

🤖 Generated with Claude Code

Packaged desktop builds delete the statechart test corpus from the bundled
pstack resources, but the server still copied every file in UPSTREAM.json,
so materializing the pack failed with ENOENT and no /pstack:* skills loaded.

The pruned directory is now one exported constant in @t3tools/pstack.
pstackPackEntries excludes it from the runtime pack and the desktop build
prunes exactly that directory, so a packaged source root is complete by
construction. checkPack still verifies the full upstream source.

Claude Opus 5.5 via T3 Code

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7bdbfed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

The unit test hardcoded the pruned directory, so a typo in
PSTACK_PACKAGED_PRUNED_DIR would still pass it. It now derives the
fixture paths from the constant, and a new case checks the shipped
UPSTREAM.json actually carries files under that prefix so an upstream
re-sync that renames the corpus cannot turn the filter into a no-op.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ScriptedAlchemy added a commit that referenced this pull request Nov 3, 2026
Keep the shared packaged-file pruning implementation from PR #51 alongside native plugin suppression. Preserve Claude's version-constrained plugin settings while suppressing native pstack whenever T3's pack is enabled.
@ScriptedAlchemy
ScriptedAlchemy merged commit 9abb77c into main Nov 3, 2026
9 of 10 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/pstack-packaged-pack-prune branch November 3, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant