Revert "Merge pull request #3578 from gsd-build/fix/3569-init-plan-phase-status"
This reverts commita244dd7fc3, reversing changes made to8f95b2fe23.
This commit is contained in:
@@ -28,7 +28,6 @@ import { resolveModel, MODEL_PROFILES } from './config-query.js';
|
||||
import { maskIfSecret } from './secrets.js';
|
||||
import { findPhase } from './phase.js';
|
||||
import { roadmapGetPhase, getMilestoneInfo, extractCurrentMilestone, extractPhasesFromSection } from './roadmap.js';
|
||||
import { determinePhaseStatus } from './progress.js';
|
||||
import { planningPaths, normalizePhaseName, toPosixPath, resolveAgentsDir, detectRuntime } from './helpers.js';
|
||||
import { generatePhaseSlug, assertSafeProjectCode } from './phase-lifecycle-policy.js';
|
||||
import type { QueryHandler } from './utils.js';
|
||||
@@ -470,17 +469,6 @@ export const initPlanPhase: QueryHandler = async (args, projectDir, workstream)
|
||||
const phaseName = (phaseInfo?.phase_name as string) ?? null;
|
||||
const phaseDir = (phaseInfo?.directory as string) ?? null;
|
||||
const plans = (phaseInfo?.plans || []) as string[];
|
||||
const summaries = (phaseInfo?.summaries || []) as string[];
|
||||
|
||||
// #3569: surface phase lifecycle status so /gsd-plan-phase can short-circuit
|
||||
// on closed (Complete) phases instead of silently replanning over shipped
|
||||
// code. Reuses determinePhaseStatus — the project-wide vocabulary used by
|
||||
// `progress` (Pending | Planned | In Progress | Executed | Complete |
|
||||
// Needs Review). When the phase has no directory on disk yet, treat it as
|
||||
// Pending (it has not been started).
|
||||
const phaseStatus = phaseDir
|
||||
? await determinePhaseStatus(plans.length, summaries.length, join(projectDir, phaseDir))
|
||||
: 'Pending';
|
||||
|
||||
// #3287: compute the canonical directory name with project_code prefix so
|
||||
// the first-touch mkdir in /gsd-plan-phase stays consistent with phase.add.
|
||||
@@ -515,7 +503,6 @@ export const initPlanPhase: QueryHandler = async (args, projectDir, workstream)
|
||||
phase_slug: (phaseInfo?.phase_slug as string) ?? null,
|
||||
padded_phase: phaseNumber ? normalizePhaseName(phaseNumber) : null,
|
||||
phase_req_ids,
|
||||
phase_status: phaseStatus,
|
||||
has_research: (phaseInfo?.has_research as boolean) || false,
|
||||
has_context: (phaseInfo?.has_context as boolean) || false,
|
||||
has_reviews: (phaseInfo?.has_reviews as boolean) || false,
|
||||
|
||||
Reference in New Issue
Block a user