fix(config): preserve explicit review overrides (null/non-mapping) when merging private layers#4076
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4076 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 384 384
Lines 35865 35866 +1
Branches 13160 13160
=======================================
+ Hits 33589 33590 +1
Misses 1618 1618
Partials 658 658
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 03:12:40 UTC
⏸️ Suggested Action - Manual Review
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.
|
21a96dd to
dbf9bc6
Compare
Motivation
reviewand treatedreview: nullor other non-mapping values as if the key were absent, which allowed a lower-priority sharedreviewblock to survive a higher-priority explicit clear/replace signal.Description
combineConfigLayersWithMetato detect the presence of the top-levelreviewkey and preserve its explicit override (includingnulland non-mapping values) when folding layers, by addinghasReviewKeyand using it when iterating layers.sharedConfigSourceprovenance only when the shared layer actually contributes a mapping-shapedreview(useextractReviewMappingto confirm contribution).test/unit/private-config.test.tsto assert thatreview: nullclears an inherited shared review block and that a non-mappingreview(e.g.false) replaces/blocks the shared review while emitting the expected warning.src/selfhost/private-config.tsandtest/unit/private-config.test.ts.Testing
npx vitest run test/unit/private-config.test.ts, and the updated tests passed (62 tests passed).git diff --checkwhich reported no whitespace/conflict issues.npm run typecheckwhich failed due to unrelated existing syntax errors insrc/queue/processors.tsoutside the changed files, not introduced by this change.npm run test:coverage -- --run test/unit/private-config.test.tswhere tests passed but coverage remapping failed withTypeError: jsTokens is not a function(coverage toolchain remap issue, unrelated to logic change);npm audit --audit-level=moderatehit a registry403 Forbiddenduring the run.Codex Task