fix(query): thread workstream through all query handlers
All 18+ query handlers accepted _workstream but never forwarded it to planningPaths/loadConfig/getMilestoneInfo. Remove _ prefix and pass workstream to all internal helper calls so --ws flag actually scopes path resolution. Affected handlers: initNewProject, initProgress, initManager, configGet, configPath, configSet, configSetModelProfile, configNewProject, configEnsureSection, validateHealth, commit, checkCommit, commitToSubrepo. Also fixes validate.ts to use paths.* fields from planningPaths instead of hardcoded join(projectDir, '.planning') paths. Closes #2731
This commit is contained in:
@@ -344,7 +344,7 @@ export const validateConsistency: QueryHandler = async (_args, projectDir, works
|
||||
* @param projectDir - Project root directory
|
||||
* @returns QueryResult with { status, errors, warnings, info, repairable_count, repairs_performed? }
|
||||
*/
|
||||
export const validateHealth: QueryHandler = async (args, projectDir, _workstream) => {
|
||||
export const validateHealth: QueryHandler = async (args, projectDir, workstream) => {
|
||||
const doRepair = args.includes('--repair');
|
||||
|
||||
// T-12-09: Home directory guard
|
||||
@@ -365,13 +365,13 @@ export const validateHealth: QueryHandler = async (args, projectDir, _workstream
|
||||
};
|
||||
}
|
||||
|
||||
const paths = planningPaths(projectDir);
|
||||
const planBase = join(projectDir, '.planning');
|
||||
const paths = planningPaths(projectDir, workstream);
|
||||
const planBase = paths.planning;
|
||||
const projectPath = join(planBase, 'PROJECT.md');
|
||||
const roadmapPath = join(planBase, 'ROADMAP.md');
|
||||
const statePath = join(planBase, 'STATE.md');
|
||||
const configPath = join(planBase, 'config.json');
|
||||
const phasesDir = join(planBase, 'phases');
|
||||
const roadmapPath = paths.roadmap;
|
||||
const statePath = paths.state;
|
||||
const configPath = paths.config;
|
||||
const phasesDir = paths.phases;
|
||||
|
||||
interface Issue {
|
||||
code: string;
|
||||
|
||||
Reference in New Issue
Block a user