Skip to content

Commit 03dcf09

Browse files
committed
fix: nest priority band inside open facet in PREFIX_TAG_REGEX
The priority-band capture was structurally independent of the -open facet group, so input like [O P1] would produce an artifact with priority_band set but no facet. Nesting the band inside the open group enforces the documented contract that bands only apply to [O-open ...] prefixes.
1 parent a4dad69 commit 03dcf09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

workers/src/orchestrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ function isStructuredInput(input: string): boolean {
812812
// 2 — "O" letter when the O branch matches (with optional facet/band)
813813
// 3 — "open" facet (only on O)
814814
// 4 — priority band "P1" / "P2.1" (only on O)
815-
const PREFIX_TAG_REGEX = /^\[(?:([DLCHE])|(O)(?:-(open))?(?:\s+(P\d+(?:\.\d+)?))?)\]\s*/;
815+
const PREFIX_TAG_REGEX = /^\[(?:([DLCHE])|(O)(?:-(open)(?:\s+(P\d+(?:\.\d+)?))?)?)\]\s*/;
816816

817817
function isPrefixedBatchInput(input: string): boolean {
818818
const paragraphs = input.split(/\n\n+/).map((p) => p.trim()).filter((p) => p.length > 0);

0 commit comments

Comments
 (0)