Skip to content

fix(engine): stop classifying non-CI YAML paths as ci changes - #8943

Closed
philluiz2323 wants to merge 1 commit into
JSONbored:mainfrom
philluiz2323:fix/8873-objective-anchor-yaml-ci-v2
Closed

fix(engine): stop classifying non-CI YAML paths as ci changes#8943
philluiz2323 wants to merge 1 commit into
JSONbored:mainfrom
philluiz2323:fix/8873-objective-anchor-yaml-ci-v2

Conversation

@philluiz2323

Copy link
Copy Markdown
Contributor

Summary

  • Drop the bare .yml/.yaml extension fallback in kindsFromPath so only real CI_SEGMENTS path matches classify as "ci".
  • Add a vitest regression in test/unit/engine-objective-anchor-config-classification.test.ts covering both branches (non-CI YAML is not "ci"; .github/workflows/ci.yml still is). Package-local node:test coverage alone is invisible to Codecov's vitest lcov — that is why fix(engine): stop classifying non-CI YAML paths as ci changes #8922's codecov/patch reported 0%.
  • Keep the package-local objective-anchor node:test assertion as well.

Closes #8873

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npx vitest run test/unit/engine-objective-anchor-config-classification.test.ts (2 passed)
  • npm --workspace @loopover/engine run build + node --test dist-test/objective-anchor.test.js (21 passed)
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Engine + vitest coverage of the changed kindsFromPath branch. Full monorepo typecheck/coverage not re-run locally.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — engine path-classification helper only; no UI surface change.

Notes

kindsFromPath tagged every .yml/.yaml file as ci via a bare-extension
fallback. Classify ci only via CI_SEGMENTS path matches, and cover both
branches from vitest so codecov/patch sees the change (JSONbored#8873 / JSONbored#8922).

Closes JSONbored#8873
@philluiz2323
philluiz2323 requested a review from JSONbored as a code owner July 26, 2026 13:58
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-26 14:23:33 UTC

3 files · 1 AI reviewer · 1 blocker · CI failing · blocked

🛑 Suggested Action - Reject/Close

Review summary
This closes #8873 correctly at the source: kindsFromPath's bare `.yml`/`.yaml` fallback was over-broad (it tagged any YAML file, including `.loopover.yml` and `docs/mkdocs.yml`, as a `"ci"` change), and removing it in objective-anchor.ts:231 while keeping the `CI_SEGMENTS` (`.github`, `workflows`) check is the right fix, not a symptom patch. Both new-branch cases (non-CI YAML excluded, `.github/workflows/ci.yml` still included) are exercised in both the node:test and vitest suites, which is exactly what's needed given vitest is what feeds codecov/patch. The one real problem is that the vitest-side regression test in test/unit/engine-objective-anchor-config-classification.test.ts replaces, rather than adds to, the existing #8874 dependency-classification test, silently dropping vitest coverage of the `package(.-lock).json` exact-match branch that #8874 specifically added vitest coverage for.

Blockers

Nits — 2 non-blocking

Why this is blocked

📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. test/unit/engine-objective-anchor-config-classification.test.ts:20-42 deletes the \#8874 'tags only exact package\(.-lock\).json as dependency, not a prefixed sibling' vitest test instead of keeping it alongside the new \#8873 test, so the dependency-classification branch \(objective-anchor.ts's \`/^package\(?:-lock\)?\\.json$/u\` check\) loses its vitest-side coverage — the same codecov/patch visibility gap this PR's own description says it's trying to avoid, now reopened for a different branch.

CI checks failing

  • validate
  • validate-tests

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8873, #8922
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 (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 989 registered-repo PR(s), 565 merged, 125 issue(s).
Contributor context ✅ Confirmed Gittensor contributor philluiz2323; Gittensor profile; 989 PR(s), 125 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff removes the `.yml`/`.yaml` extension fallback so `kindsFromPath` only tags "ci" via `CI_SEGMENTS`, and adds negative tests (both in the engine's own test file and the vitest suite) asserting non-CI YAML like `.loopover.yml`/`docs/mkdocs.yml` no longer yields "ci" while `.github/workflows/ci.yml` still does.

Review context
  • Author: philluiz2323
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, TypeScript, CSS, Cuda, HTML, Kotlin
  • Official Gittensor activity: 989 PR(s), 125 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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.

🟩 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 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests); AI reviewers agree on a likely critical defect: test/unit/engine-objective-anchor-config-classification.test.ts:20-42 deletes the #8874 'tags only exact package(.-lock).json as dependency, not a prefixed sibling' vitest test instead of keeping it alongside the new #8873 test, so the dependency-classification branch (objective-anchor.ts's `/^package(?:-lock)?\.json$/u` check) loses its vitest-side coverage — the same codecov/patch visibility gap this PR's own description says it's trying to avoid, now reopened for a different branch.). 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.

@loopover-orb loopover-orb Bot closed this 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.

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