Skip to content

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

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-objective-anchor-yaml-8873
Closed

fix(engine): classify 'ci' change-kind only by real CI path segments, not any .yml/.yaml (#8873)#8921
RealDiligent wants to merge 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 regardless of location, diluting the ci change-kind dimension scoreObjectiveAnchor relies on.

Fix

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 in the function already uses.

Tests

  • .loopover.yml (root) → config but not ci.
  • docs/mkdocs.ymlnot ci.
  • .github/workflows/ci.yml → still ci (proves CI_SEGMENTS path classification is unaffected).

Reverting the change fails the negative assertions. git diff --check clean.

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 26, 2026 13:30
@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.
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@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.84%. Comparing base (8a3d2c9) to head (a2446db).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8921   +/-   ##
=======================================
  Coverage   93.84%   93.84%           
=======================================
  Files         803      803           
  Lines       80084    80084           
  Branches    24277    24276    -1     
=======================================
  Hits        75157    75157           
+ Misses       3562     3561    -1     
- Partials     1365     1366    +1     
Flag Coverage Δ
backend 95.13% <100.00%> (ø)

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 27.50% <100.00%> (+3.33%) ⬆️

... and 1 file with indirect coverage changes

@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-26 13:47:33 UTC

2 files · 1 AI reviewer · no blockers · CI green · dirty

⏸️ Suggested Action - Manual Review

Review summary
This diff removes the bare `.yml`/`.yaml` extension fallback from `kindsFromPath`'s `ci` classification in objective-anchor.ts, so `ci` is now only tagged via a real `CI_SEGMENTS` path segment (`.github`/`workflows`), matching the path-segment discipline used by every other change-kind in that function. The fix is correctly scoped to the root cause (the classifier itself, not a downstream consumer) and the three added tests cover both negative cases (`.loopover.yml` root config, `docs/mkdocs.yml`) and the positive case (`.github/workflows/ci.yml`) proving CI_SEGMENTS classification is unaffected. The change is small, closes the linked issue #8873, and is well-targeted with no scope creep.

Nits — 4 non-blocking
  • The text-based `KIND_SYNONYMS` regex for "ci" in kindsFromText (objective-anchor.ts) still matches free-text mentions of "yaml" via the config synonym or generic ci-related words in titles/labels/notes, which is a separate but related signal path not touched by this PR — worth confirming that's intentionally out of scope.
  • The inline comment above the `if` block (objective-anchor.ts) is a bit long for a single conditional; could be trimmed to one line referencing fix(engine): objective-anchor misclassifies any .yml/.yaml file anywhere as a "ci" change kind #8873 without restating the whole PR description.
  • Consider whether `kindsFromText`'s synonym match for "yaml" under the `config` kind should also be excluded from ever contributing to `ci` via free text, for full parity with the path-segment discipline enforced here.
  • The test file's top comment about Codecov/node:test coverage predates this PR; no action needed but worth keeping in sync if the coverage rationale changes.

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 ❌ 8/20 High 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: 309 registered-repo PR(s), 124 merged, 37 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 309 PR(s), 37 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The diff removes the bare .yml/.yaml extension fallback and classifies 'ci' only via CI_SEGMENTS, matching the requested fix, and adds the required negative tests for .loopover.yml and docs/mkdocs.yml plus a positive test confirming CI_SEGMENTS classification still works.

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: 309 PR(s), 37 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 2 steps in the Signals table above.
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: success
  • config: 03a7f8b529a9 · pack: oss-anti-slop
  • record: e66db5eb697d (schema v2, head a2446db)

🟩 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
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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

1 participant