Repository navigation
fix(cli): MCP/CLI task tokenizer parity and adf context --bundle paths - #453
Merged
Merged
Conversation
…paths MCP getProjectContext split the task on whitespace only, so "ADF." failed to match the ADF trigger and on-demand modules were silently dropped. It now resolves through a shared resolveProjectContext helper that uses the CLI's tokenizeTask. getProjectContext is the only MCP tool taking a task. adf context --bundle joined aiDir onto paths bundleModules had already resolved, exiting 2 with "Module not found: core.adf". The reader now reads the path as given. Closes #438 Closes #439 Part of #437 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 28, 2026
stackbilt-admin
pushed a commit
that referenced
this pull request
Nov 28, 2026
Add 3.0.0 entries for #453 (MCP getProjectContext task tokenizer parity, adf context --bundle path fix; #438, #439), #454 (live ceiling headroom in adf context --files; #443), #382 (publish:check on Windows) and #385 (Dependabot covers the pinned SBOM generator). Apply the #456 review nits: drop the two stray blank lines that made the Changed list loose, and note that #425 also updated the supply-chain workflow and dependabot.yml comments. The 3.0.0 date placeholder is left for the release owner. Refs #397 Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin
pushed a commit
that referenced
this pull request
Nov 28, 2026
Brings in #453 (task tokenizer parity, --bundle path fix) and #454 (ceiling headroom). Resolves the adf-context.ts conflict by keeping both the path-token import and triggerMatches (this branch) and the ceilings field (main). The adf-ceilings key-order test now expects triggerMatches between resolvedModules and ceilings. Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin
pushed a commit
that referenced
this pull request
Nov 28, 2026
…o feat/issue-447-preflight-slice Brings in #453 and #454 (squash-merged on main) through #452's round-3 merge, plus #452's memoized resolvePathTokenRoot and filePathRoutingKeywords. Conflicts resolved toward this branch's preflight code (which already contains the #443/#454 ceilings work); fileRoutingKeywords is kept as a thin wrapper over #452's filePathRoutingKeywords. Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin
added a commit
that referenced
this pull request
Nov 28, 2026
Add 3.0.0 entries for #453 (MCP getProjectContext task tokenizer parity, adf context --bundle path fix; #438, #439), #454 (live ceiling headroom in adf context --files; #443), #382 (publish:check on Windows) and #385 (Dependabot covers the pinned SBOM generator). Apply the #456 review nits: drop the two stray blank lines that made the Changed list loose, and note that #425 also updated the supply-chain workflow and dependabot.yml comments. The 3.0.0 date placeholder is left for the release owner. Refs #397 Co-authored-by: Kurt Overmier <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Two context bugs, fixed together. Both gave agents a wrong or missing governance answer with no signal that anything had gone wrong.
#438: MCP getProjectContext drops on-demand rules on trailing punctuation
getProjectContextsplit the task on whitespace only, soADF.never matched theADFtrigger.packages/cli/src/commands/project-context.ts(resolveProjectContext) tokenizes with the CLI'stokenizeTask.serve.tsnow calls it.getProjectContextis the only one that takes a task string, so nothing else needed changing.keywordsformcp.getProjectContextnow keep the original casing, the same as the CLIbundleandcontextsources. The old code lowercased them. Trigger matching was already case-insensitive. No output JSON keys or exit codes changed.#439:
adf context --bundleexits 2 with "Module not found: core.adf"readFilecallback joinedaiDironto a path thatbundleModuleshad already resolved. It now reads the path it is given.Verification
Before the fix (built CLI, this repo):
adf context --files packages/adf/src/manifest.ts --keywords ADF --bundle --format jsongaveBundle error (core.adf): Module not found: core.adf, exit 2.getProjectContext:"...for ADF."returned 5,508 chars without the "zero runtime dependencies" rule."...for ADF"returned 7,100 chars with the rule.After the fix:
adf contextcommand exits 0 and resolvescore.adf, state.adf, adf-dev.adf.Tests: new
packages/cli/src/__tests__/context-parity.test.ts(8 tests):adf bundleand MCPresolveProjectContextresolve the same modules for the task with and without the trailing period.adf context --bundlewith--files, with--keywords, with both, and with a custom relative or absolute--ai-dir.--bundletests fail when only the old reader is put back.Full suite on Windows: 2091 passed, 10 failed. Re-run in isolation, every failure passes except one known environmental case:
Closes #438
Closes #439
Part of #437
🤖 Generated with Claude Code