Skip to content

fix(engine): classify 'ci' change-kind only by real CI path segments, not any .yml/.yaml (#8873) - #8983

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-objective-anchor-yaml-8873
Jul 26, 2026
Merged

fix(engine): classify 'ci' change-kind only by real CI path segments, not any .yml/.yaml (#8873)#8983
JSONbored merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-objective-anchor-yaml-8873

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Problem

Closes #8873.

packages/loopover-engine/src/objective-anchor.ts's kindsFromPath classified ci via CI_SEGMENTS.has(segment) || filename.endsWith('.yml') || filename.endsWith('.yaml'). The bare-extension fallback tagged any YAML file — root .loopover.yml, docs/mkdocs.yml — as ci, diluting the ci change-kind dimension scoreObjectiveAnchor relies on.

Fix

Drop the extension fallback. ci is classified only via a real CI path segment (CI_SEGMENTS), the same path-segment discipline every other change-kind uses.

Tests

.loopover.yml and docs/mkdocs.yml no longer produce ci; .github/workflows/ci.yml still does. Reverting fails the negative assertions. git diff --check clean.

(Re-opened after the prior run's validate-tests hit a transient CI infra flake — npm ci retry exhaustion + missing MCP/miner build binaries, unrelated to this engine-only change; tests pass locally.)

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 26, 2026 15:00
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

… not any .yml/.yaml

objective-anchor.ts's kindsFromPath tagged any YAML file as 'ci' via a bare `.yml`/`.yaml` extension
fallback, so a root `.loopover.yml` or `docs/mkdocs.yml` diluted the 'ci' change-kind dimension
scoreObjectiveAnchor relies on. Drop the extension fallback -- 'ci' is now classified only via a real
CI path segment (CI_SEGMENTS), the same path-segment discipline every other change-kind uses.

Tests: a config YAML at the repo root and docs/mkdocs.yml no longer produce 'ci'; a YAML under a real
CI path segment (.github/workflows/ci.yml) still does.
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.87%. Comparing base (4611040) to head (3615da1).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8983      +/-   ##
==========================================
- Coverage   93.87%   93.87%   -0.01%     
==========================================
  Files         807      807              
  Lines       80448    80448              
  Branches    24391    24390       -1     
==========================================
- Hits        75522    75520       -2     
+ Misses       3561     3560       -1     
- Partials     1365     1368       +3     
Flag Coverage Δ
backend 95.16% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-engine/src/objective-anchor.ts 30.00% <100.00%> (+1.66%) ⬆️

... and 1 file with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-26 15:18:44 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This removes the bare `.yml`/`.yaml` extension fallback from `kindsFromPath`'s `ci` classification, leaving only the `CI_SEGMENTS` path-segment check (`.github`, `workflows`), which correctly stops tagging root-level or docs YAML files as `ci`. The fix is at the right layer (the classifier itself, not a downstream consumer), and the new tests verify both the negative case (`.loopover.yml`, `docs/mkdocs.yml`) and the positive case (`.github/workflows/ci.yml`) against the real function. Note that `kindsFromText`'s `KIND_SYNONYMS` regex for `ci` still matches the literal word `yaml` in free text (labels/titles/notes), so a title containing 'yaml' could still tag `ci` via that separate path — but that's outside this diff's stated scope of `kindsFromPath`.

Nits — 3 non-blocking
  • The KIND_SYNONYMS regex for 'ci' (unchanged, not in this diff) still matches free-text mentions of 'yaml', so text-based classification could still tag unrelated YAML changes as 'ci' — worth a follow-up issue if that's also considered dilution.
  • The inline comment in objective-anchor.ts:231-233 is fairly verbose for a one-line fix; could be trimmed to a single sentence per repo comment conventions.
  • Consider whether CONFIG_FILENAMES' inclusion of '.loopover.yml' combined with the KIND_SYNONYMS 'config' regex matching 'yaml' creates similar dilution for the 'config' kind, for consistency with this fix's rationale.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8873
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 305 registered-repo PR(s), 121 merged, 37 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 305 PR(s), 37 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff removes the bare .yml/.yaml extension fallback so `ci` is only assigned via CI_SEGMENTS path matching, and adds negative tests confirming `.loopover.yml` and `docs/mkdocs.yml` no longer produce "ci" while `.github/workflows/ci.yml` still does.

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, Ruby, TypeScript, Svelte, Cuda, JavaScript, Markdown, MDX
  • Official Gittensor activity: 305 PR(s), 37 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
🧪 Chat with LoopOver

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

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Decision record
  • action: hold · clause: ai_review_inconclusive
  • config: 03a7f8b529a9 · pack: oss-anti-slop
  • record: 6402b7af842f (schema v2, head 3615da1)

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

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 26, 2026
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(engine): objective-anchor misclassifies any .yml/.yaml file anywhere as a "ci" change kind

2 participants