Skip to content

Commit facbecf

Browse files
beyondnetPeruclaude
andcommitted
chore(release): merge develop -> main — assistant workspaceRef default
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 parents b876e50 + 36dba5c commit facbecf

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/packages/agent-runtime/src/application/context-mapper.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ import type { HarnessExecutionResult } from '../domain/ports/harness.port';
1616
/** Canonical phase ids (must mirror core-domain GatePhase). */
1717
const CANONICAL_PHASES = ['discovery', 'design', 'construction', 'qa', 'release'] as const;
1818

19+
/**
20+
* The Core requires a non-empty OPAQUE workspaceRef (single identifier, no
21+
* slashes) to evaluate; it resolves it beneath WORKSPACE_ROOT. Conversational
22+
* requests (e.g. the assistant) often carry no ref, so fall back to the
23+
* canonical corpus ref rather than sending an empty context that the Core
24+
* rejects with HTTP 400.
25+
*/
26+
const DEFAULT_WORKSPACE_REF = 'rulesets';
27+
1928
type PhaseIdT = NonNullable<EvaluationContext['phaseId']>;
2029
type EvaluationKindT = EvaluationContext['kinds'][number];
2130

@@ -51,7 +60,7 @@ export function buildEvaluationContext(
5160
: undefined,
5261
phaseId: toPhaseId(ctx.phase),
5362
gateId: ctx.gate,
54-
workspaceRef: ctx.workspaceRef,
63+
workspaceRef: ctx.workspaceRef ?? DEFAULT_WORKSPACE_REF,
5564
rulesetRef: ctx.rulesetRef,
5665
rulesetVersion: ctx.rulesetVersion,
5766
policyRefs: ctx.policyRefs,

0 commit comments

Comments
 (0)