Skip to content

Commit f6de075

Browse files
committed
fix: remove done/complete from finalization regex and coerce frontmatter scalars to strings
- Remove done and complete from isFinalization regex in runValidate so normal validate calls using the documented done: prefix are not blocked by the artifact provenance gate - Coerce title, intent, authority_band, uri, and exposure to String in parseFrontmatter to prevent TypeError when fmParseScalarValue returns non-string types for fields that downstream code expects as strings
1 parent a0062f1 commit f6de075

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

workers/src/orchestrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ async function runValidate(message: string, state?: OddkitState): Promise<Oddkit
589589

590590
// Artifact provenance gate: when completion claims mention finalizing work,
591591
// check for session capture, change summary, and version tracking
592-
const isFinalization = /\b(commit|pr|pull request|merge|ship|deploy|release|publish|finalize|complete|done|submit|deliver)\b/i.test(message);
592+
const isFinalization = /\b(commit|pr|pull request|merge|ship|deploy|release|publish|finalize|submit|deliver)\b/i.test(message);
593593
if (isFinalization) {
594594
const hasJournal = /\b(journal|ledger|oldc|session|capture)/i.test(message);
595595
const hasChangeSummary = /\b(changelog|change\s*log|summary|what changed|release notes)/i.test(message);

workers/src/zip-baseline-fetcher.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ function parseFrontmatter(content: string): FrontmatterResult {
256256

257257
const result: FrontmatterResult = { ...full };
258258

259+
for (const key of ["title", "intent", "authority_band", "uri", "exposure"] as const) {
260+
if (result[key] != null && typeof result[key] !== "string") {
261+
(result as Record<string, unknown>)[key] = String(result[key]);
262+
}
263+
}
264+
259265
if (typeof result.tags === "string") {
260266
result.tags = [result.tags];
261267
} else if (Array.isArray(result.tags)) {

0 commit comments

Comments
 (0)