fix(engine): validate metadata candidate paths - #3950
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | ca26ea5 | Commit Preview URL Branch Preview URL |
Jul 07 2026, 07:41 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3950 +/- ##
=======================================
Coverage 93.66% 93.66%
=======================================
Files 372 372
Lines 34856 34856
Branches 12743 12743
=======================================
Hits 32649 32649
Misses 1588 1588
Partials 619 619
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 07:52:11 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
candidatePathsmetadata is malformed or non-array by applying the repository's usual array guard pattern.Description
normalizeCandidatePathsinpackages/gittensory-engine/src/miner-goal-lane-fit.tsto acceptunknownand return[]when!Array.isArray(paths), preserving trimming and skipping of non-string/blank entries.computeMetadataLaneFitthrough the revised normalizer so non-arraycandidatePathsno longer throw or iterate strings character-by-character.packages/gittensory-engine/test/miner-goal-lane-fit.test.tsand the root unit testtest/unit/miner-goal-lane-fit.test.tsto ensure malformed metadata falls back to label-only scoring.Testing
npx vitest run test/unit/miner-goal-lane-fit.test.ts, which passed locally.npm --workspace @jsonbored/gittensory-engine run build, which completed successfully.npm --workspace @jsonbored/gittensory-engine test -- miner-goal-lane-fit.test.tshit unrelated package test type-check failures in other tests (pre-existing) before the targeted package test could complete.npm run test:ciprogressed to coverage but was interrupted by an existingRangeError: Maximum call stack size exceededcoming from unrelatedtest/unit/queue.test.ts, so the full CI run could not be completed here.Codex Task