Repository navigation
Commit f161b70
Fix false local references from slash-separated prose (#451)
* fix: ignore slash-separated prose references
Signed-off-by: Tomas <[email protected]>
* fix(references): preserve root-level paths
Context:
Plain reference matching required a directory segment after an explicit `./`, so `./guide` produced no candidate even though the prefix disambiguates the path from prose.
Changes:
- Allow zero or more directory segments between `./` and the final path component.
- Add the root-level extensionless case to the existing explicit-path regression matrix.
Impact:
Root-level extensionless references with an explicit `./` resolve again. Unprefixed slash-separated prose remains excluded, and nested explicit paths keep their existing behavior.
Validation:
- `uv run --extra dev pytest -q tests/nodes/test_security_remediation.py::test_plain_local_reference_requires_an_explicit_path_signal`: 3 passed.
- Focused reference-resolver set: 10 passed.
- Ruff on the changed source and test files: passed.
- `git diff --check`: passed.
Notes:
None.
Signed-off-by: Tomas <[email protected]>
* test(references): cover model/provider prose
Context:
Issue #450 lists model/provider as ordinary slash-separated prose that must not become a local file reference.
Changes:
- Add model/provider to the existing plain-prose reference regression case.
Impact:
Extend the false-positive contract coverage without changing production reference parsing.
Validation:
- Focused reference suite: 14 passed, 57 deselected.
- Lint: All checks passed.
- Format check: 193 files already formatted.
- Build: source distribution and wheel built successfully.
- git diff --check: passed.
Notes:
Bare dotted tokens remain excluded because versions, domains, and identifiers are ambiguous with root-level filenames.
Signed-off-by: Tomas <[email protected]>
* test(references): guard dotted prose
Context:
Bare dotted tokens are ambiguous with root-level filenames and can fabricate missing references for versions, domains, or ecosystem names.
Changes:
- Add SkillSpector 2.10.0, node.js, and example.com to the plain-prose negative reference case.
Impact:
Protect the partial-analysis boundary from a future broad match of unquoted dotted prose.
Validation:
- Focused reference suite: 14 passed, 57 deselected.
- Ruff check: All checks passed.
- git diff --check: passed.
Notes:
Root-level filenames remain available through quotes, code spans, Markdown links, or an explicit ./ prefix.
Signed-off-by: Tomas <[email protected]>
---------
Signed-off-by: Tomas <[email protected]>
Co-authored-by: Tomas <[email protected]>
Co-authored-by: Narendran Raghavan <[email protected]>1 parent 03e8f56 commit f161b70
2 files changed
Lines changed: 39 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
355 | 392 | | |
356 | 393 | | |
357 | 394 | | |
| |||
0 commit comments