Repository navigation
Lens reference-expectation sanitizer only recognizes hyphenated labels, so underscore catalog IDs fail the node #283
Description
Summary
sanitizeLensReferenceExpectationAuthority strips unauthorized reference-expectation IDs only when they match a hyphenated shape. An underscore-separated catalog-style ID such as LEND_ACC_01 is not matched, so it survives sanitization and is then reported as an error by verifyPropertyProvenanceArtifacts, failing the node.
Confirmed live in Aave v4 run R44.
Evidence
Run aave-v4-v0012-main-issue272-r44-invariant-only, image im-01KZBJ546AZANSE7RNBY35A9DG (main 77da78a). Node property-specification-0kn0t failed at 2026-08-06T14:49Z:
Property lens expectation "LEND_ACC_01" is not present in a supplied pinned-reference catalog;
Property lens expectation "LEND_ACC_02" is not present in a supplied pinned-reference catalog;
...
Run state at that point: 19 succeeded / 2 failed / 11 pending, run failed, property-specification-fanin still pending.
Cause
packages/runtime/src/artifact-gates.ts:1767
function isUnsupportedExternalReferenceLabel(expectationId: string): boolean {
return /^[A-Z][A-Z0-9]*-\d+$/u.test(expectationId);
}LEND_ACC_01 contains underscores, so [A-Z0-9]* cannot span _ACC_ and the pattern does not match. The sanitizer's guard at :1590 therefore bails out for that property:
if (unauthorized.some((expectationId) => !isUnsupportedExternalReferenceLabel(expectationId))) return property;and the ID reaches verifyPropertyProvenanceArtifacts (:1558-1568), which emits PROPERTY_REFERENCE_EXPECTATION_UNAUTHORIZED at severity error — failing the node.
So the outcome depends purely on which separator the model happened to use for an equally-fabricated identifier: LEND-01 is quietly sanitized, LEND_ACC_01 kills the node.
Impact
property-specification-fanin depends on all eight lens nodes, so one lens failing this way blocks fan-in, invariant setup, Recon, findings and report.md. The node does fail visibly and is retryable, but a re-run of the same lens will usually produce the same identifier shape, so it is effectively deterministic.
R44 hit this alongside #281 (property-specification-a16z), leaving two blocked lenses.
Expected fix
Widen the matcher to cover catalog-style identifiers with underscore separators, e.g. /^[A-Z][A-Z0-9_]*[-_]\d+$/u, so the same class of fabricated external label is sanitized regardless of separator.
Worth deciding explicitly rather than by regex accident: is an unauthorized reference expectation meant to be sanitized (the model cited something that does not exist, so drop the citation and continue) or to fail the node (the model fabricated a citation, so reject the artifact)? Right now it is both, split on a detail of the identifier's punctuation. Whichever is intended should apply uniformly.
Regression test: a lens whose reference_expectations contain an underscore-separated unauthorized ID must be sanitized the same way a hyphenated one is, and the node must not fail.
Related
- Workspace handoff staging aborts when an ignored runtime root exists: exclude pathspec misses the directory entry #281 — the other blocker in the same R44 run.
- Rewritten published artifact strands runs: verified dependency digest mismatch fails fan-in forever with zero failed nodes #275 / PR fix(runtime): keep the verification marker consistent when sanitizing a property lens #279 — the sanitizer's marker-consistency fix; this is the same function, different branch.
- Draft PR fix(runtime): avoid ignored roots in workspace handoff staging #254 bundles "accept empty optional reference expectation lists as absent so valid implementation artifacts are not rejected", which is adjacent but not this.
Activity
fix(runtime): match multi-segment catalog labels
fix(runtime): sanitize underscore-separated reference labels
fix(runtime): match multi-segment catalog labels
fix(runtime): bound lens expectation stripping to plausible copied ci…
fix(runtime): close keyword-internal separator bypasses in the author…
fix(runtime): stop lens expectation authority from turning on label s…