fix(parser): set workspaceRootPath for Claude and OpenCode sessions - #86
Merged
Aymen (aymenfurter) merged 1 commit intoMay 30, 2026
Conversation
The Codex parser records the session cwd as `workspaceRootPath`, which lets config-health and Agentic SDLC workspace scans resolve the project root on disk. The Claude and OpenCode parsers already capture the same information — `cwd` from the Claude JSONL user records and `directory` from the OpenCode session — but discard it, so their sessions have no resolvable root and those scans return empty for non-Codex harnesses. Propagate it the same way Codex does (`value || undefined`), so repo scans, dependency analysis, and workspace-aware features work for Claude and OpenCode sessions too. Adds a parser test per harness asserting the field is populated from the recorded cwd/directory.
Contributor
Author
|
@microsoft-github-policy-service agree |
Aymen (aymenfurter)
approved these changes
May 30, 2026
Aymen (aymenfurter)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the contribution Flusspferd (@JuliusGruber)! Clean fix — properly wires up workspaceRootPath for Claude and OpenCode sessions so downstream harness logic resolves paths against the correct workspace root. LGTM.
Flusspferd (JuliusGruber)
pushed a commit
to JuliusGruber/AI-Engineering-Coach
that referenced
this pull request
Jun 1, 2026
Resolved conflicts: - src/core/metric-engine.ts: resolved toward upstream. Upstream microsoft#85 (locale-independent serialization) converges with the fork's en-US pin (44e9532); dropped the fork's explanatory comment so the file is now byte-identical to upstream, retiring that fork drift. - package.json: kept fork-additive engines.node>=20 and @types/ws 8.18.1; took upstream's vscode ^1.120.0, @types/vscode 1.120.0, @vitest/coverage-v8 4.1.7. - package-lock.json: regenerated via npm install --package-lock-only. Auto-merged cleanly: parser-claude{,.test}.ts, parser-opencode{,.test}.ts (microsoft#86 workspaceRootPath), parser-codex.test.ts, panel-request-service.ts. Build gate: npm run build:standalone OK.
Flusspferd (JuliusGruber)
pushed a commit
to JuliusGruber/AI-Engineering-Coach
that referenced
this pull request
Jun 1, 2026
- Refresh AUTO sections: staleness banner (0 behind), counts block (52/12/1, gap 10, no DRIFT), gap-methods list (flags calibrateRule + runRuleTests as not-yet-bucketed TODOs), no new upstream RPC methods. - Record the merge outcome: microsoft#53/microsoft#67/microsoft#85/microsoft#86 merged; metric-engine.ts drift retired (resolved toward upstream); fork-authored drift now 2 files (parser-codex.test.ts, panel-request-service.ts), both upstream-it. - Preserved the human bucket A-E narrative.
Flusspferd (JuliusGruber)
added a commit
to JuliusGruber/AI-Engineering-Coach
that referenced
this pull request
Jun 4, 2026
Synced to upstream 89c7688 (+19 commits). Refresh the [AUTO] banner/counts (0 behind, gap 7, exposed 68; surface unchanged) and mark the bucket-E per-harness Follow-up RESOLVED: upstream cb61436 (microsoft#86) sets workspaceRootPath for the Claude and OpenCode parsers (parser-claude.ts:678, parser-opencode.ts:303) -- exactly the upstream-it candidate the report flagged -- so SDLC repo-scan + deps + Learning quiz personalization now resolve for all three harnesses. Delta scanned per the append-only ledger rule: entirely bug fixes, webview/ReDoS security hardening, dep bumps, docs, tests, and VS Code-only surfaces -- no new feature bucket.
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.
Description
The Codex parser records the session cwd as
workspaceRootPath, which lets config-health and Agentic SDLC workspace scans resolve the project root on disk (parser-harnesses.tspreferssession.workspaceRootPathwhen it exists on disk). The Claude and OpenCode parsers already capture the same information —cwdfrom the Claude JSONL user records anddirectoryfrom the OpenCode session — but discard it, so their sessions have no resolvable root and those scans fall back to the harness data directory, returning empty for non-Codex harnesses.This PR propagates the value the same way the Codex parser already does (
value || undefined), so repo scans, dependency analysis, and other workspace-aware features work for Claude and OpenCode sessions too.parser-claude.ts: setworkspaceRootPath: cwd || undefined(cwd captured from the first user record).parser-opencode.ts: setworkspaceRootPath: rawSession.directory || undefined.No behavior change for sessions whose recorded path no longer exists on disk: the consumer's existing
fs.existsSyncguard still falls back to the prior root, identical to how the Codex parser already behaves.Related Issues
N/A
Checklist
npm run checkpasses (typecheck + lint + spellcheck + knip + tests)🤖 Generated with Claude Code