Skip to content

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

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

packages/loopover-engine/src/objective-anchor.ts's kindsFromPath (line 231) does CI_SEGMENTS.has(segment) || filename.endsWith(".yml") || filename.endsWith(".yaml") -- the bare-extension fallback tags any YAML file (e.g. root .loopover.yml, docs/mkdocs.yml) as "ci" regardless of location, diluting the "ci" change-kind dimension scoreObjectiveAnchor relies on. Untested -- the existing .loopover.yml test only checks "config" is present, never that "ci" is absent.

Requirements

Drop the bare-extension fallback; classify "ci" only via CI_SEGMENTS path-segment match (the same discipline already used for every other change-kind category in this function).

Deliverables

  • kindsFromPath no longer tags a YAML file as "ci" purely by extension -- only real CI-path segments trigger the classification
  • A negative test asserting a non-CI YAML file (e.g. .loopover.yml, docs/mkdocs.yml) does NOT produce a "ci" change-kind

All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.

Test Coverage Requirements

packages/loopover-engine/** -- 99%+ patch coverage, branch-counted, including the new negative test.

Expected Outcome

Only files under real CI path segments are classified as "ci" change kind; a YAML config file elsewhere in the repo no longer dilutes that signal.

Links & Resources

  • packages/loopover-engine/src/objective-anchor.ts:148,231

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions