Skip to content

fix(config): parse gate tri-state modes case-insensitively in manifest - #2612

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:fix/gate-mode-case-insensitive
Jul 2, 2026
Merged

fix(config): parse gate tri-state modes case-insensitively in manifest#2612
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:fix/gate-mode-case-insensitive

Conversation

@kiannidev

@kiannidev kiannidev commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • review.profile is parsed case-insensitively (ASSERTIVEassertive), but gate tri-state modes (block/advisory/off) used exact string equality in normalizeOptionalGateMode.
  • Values like gate.linkedIssue: BLOCK or settings.linkedIssueGateMode: Advisory were silently dropped with a warning, breaking live gate and predicted-gate parity.
  • Normalize gate mode strings with trim().toLowerCase() before comparison, matching the profile parser pattern from fix(config): wire badgeEnabled into the .gittensory.yml manifest parser #2598-class config hardening.

Scope

  • Single function change in focus-manifest.ts plus unit tests.
  • No linked issue — self-evident parser parity fix.

Validation

  • git diff --check
  • npx vitest run test/unit/focus-manifest.test.ts -t "gate tri-state" — passing

Safety

  • No secrets or behavior change for repos already using lowercase modes.

Gate modes in .gittensory.yml were compared case-sensitively, so BLOCK or
Advisory values were silently dropped unlike review.profile parsing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 2, 2026 13:07
@dosubot dosubot Bot added the size:XS label Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.02%. Comparing base (c4b797b) to head (829a7ae).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2612   +/-   ##
=======================================
  Coverage   96.02%   96.02%           
=======================================
  Files         233      233           
  Lines       26077    26079    +2     
  Branches     9474     9475    +1     
=======================================
+ Hits        25041    25043    +2     
  Misses        425      425           
  Partials      611      611           
Files with missing lines Coverage Δ
src/signals/focus-manifest.ts 99.27% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 22:56:41 UTC

2 files · 1 AI reviewer · no blockers · readiness 73/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This change correctly normalizes manifest gate mode strings with trim/lowercase before validating the tri-state values, bringing gate parsing in line with the existing case-insensitive review.profile behavior. The added test exercises the live manifest fields and the settings overlay path, including resolveEffectiveSettings precedence, so the changed behavior is covered on the important parser paths. No blocking defect is visible in the diff.

Nits — 3 non-blocking
  • nit: test/unit/focus-manifest.test.ts:1544 should include at least one surrounding-whitespace value, since src/signals/focus-manifest.ts:421 now intentionally accepts trimmed gate modes and that behavior is otherwise unpinned.
  • test/unit/focus-manifest.test.ts:1544: change one fixture value such as `"Advisory"` to `" Advisory "` so the test covers both halves of the new `trim().toLowerCase()` normalization.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 1757 registered-repo PR(s), 868 merged, 40 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1757 PR(s), 40 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 1757 PR(s), 40 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@dosubot dosubot Bot added the lgtm label Jul 2, 2026
@JSONbored
JSONbored merged commit a03e8f8 into JSONbored:main Jul 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Development

Successfully merging this pull request may close these issues.

2 participants