fix(review): parse a scalar source field written as a YAML sequence (#8016) - #8031
Conversation
…SONbored#8016) source-evidence.ts's parseSimpleFrontmatter had only block-scalar and plain-scalar branches; its sibling duplicates.ts also handles the block/flow-sequence case (inline === ""). A scalar-only source field authored as a YAML sequence (e.g. documentationUrl:\n - https://...) was therefore captured by the duplicate-detection parser but invisible to extractSubmittedSourceUrls/checkSubmittedSourceEvidence, silently skipping the fetch-reachability gate for that URL. Port the missing sequence branch verbatim from duplicates.ts so both parsers accept the same YAML shapes. Regression tests cover capture + fetch-verification of the sequence form.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-22 14:06:56 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
source-evidence.tsandduplicates.tseach hand-roll aparseSimpleFrontmatter(a known parity-gap class between these two files — see #7250 /content-repo-spec.ts:132).duplicates.ts's parser has three branches — block-scalar, block/flow-sequence (inline === "", collects- itemlines), and plain-scalar — butsource-evidence.ts's had only two: the sequence branch was never ported.Concretely: a scalar-only source field authored as a YAML sequence
was captured by
duplicates.ts(duplicate detection) but invisible toextractSubmittedSourceUrls/checkSubmittedSourceEvidence(the fetch-reachability hard-close gate) — the URL never got fetch-verified.documentationUrlis a scalar field, not one of the list fields (sourceUrls/retrievalSources) thatlistSourceUrlValuesrescues, so nothing else caught it.Fix
Port the missing block/flow-sequence branch verbatim from
duplicates.ts(including itsv8 ignorefallbacks for the?? ""noUncheckedIndexedAccessguards). The existing block-scalar and plain-scalar cases are unchanged (the finalelse if (inline !== "")becomes a plainelse, reached only for non-empty non-block inline values exactly as before).Scope
wantedPaths(src/review/content-lane/**,test/unit/**); noblockedPathsValidation
npx vitest run test/unit/content-lane-source-evidence.test.ts— 86/86 pass (incl. 2 new#8016tests: capture + fetch-verification)content-lane-duplicatessuite still green (the source-of-truth parser is untouched)typecheckclean on changed files (only the 2 pre-existing localsemverTS7016s remain)git diff --checkcleanSafety
Closes #8016