diff --git a/loopx/control_plane/presentation/action_review_plan.ts b/loopx/control_plane/presentation/action_review_plan.ts index f1bc24419a..3a0337bc18 100644 --- a/loopx/control_plane/presentation/action_review_plan.ts +++ b/loopx/control_plane/presentation/action_review_plan.ts @@ -1,4 +1,5 @@ import type {DecisionOutcome, ResumeState} from "../todos/user_completion_types.js"; +import {BARE_SHA256_PATTERN} from "../content_digest.ts"; export type ActionReviewIdentity = { schemaVersion: "action_review_plan_v0"; @@ -111,7 +112,7 @@ function goalCreationProgress(proposal: Record): GoalCreationPr const workspace = objectValue(steps?.workspace_validated); const digest = textValue(workspace?.workspace_digest); const goalId = textValue(parameters?.goal_id); - if (!goalId || workspace?.outcome !== "workspace_validated" || !digest || !/^[a-f0-9]{64}$/.test(digest)) return undefined; + if (!goalId || workspace?.outcome !== "workspace_validated" || !digest || !BARE_SHA256_PATTERN.test(digest)) return undefined; const progress: GoalCreationProgress = {workspaceDigest: digest}; const goal = objectValue(steps?.goal_bootstrapped); const agent = objectValue(steps?.agent_bound); diff --git a/tests/control_plane_ts/content_digest_single_owner.test.ts b/tests/control_plane_ts/content_digest_single_owner.test.ts index 98d26a63ef..eb70ca8cd7 100644 --- a/tests/control_plane_ts/content_digest_single_owner.test.ts +++ b/tests/control_plane_ts/content_digest_single_owner.test.ts @@ -122,6 +122,7 @@ const CANONICAL_CONSUMERS = [ "control_plane/goals/shared_goal_alignment.ts", "control_plane/goals/source_session_lifetime.ts", "control_plane/governed_capability.ts", + "control_plane/presentation/action_review_plan.ts", "control_plane/quota/refresh_external_delivery.ts", "control_plane/runtime/execution_identity.ts", "control_plane/runtime/usage_statistics_cycles.ts",