Skip to content

fix(skills): preserve filenames when parsing reference annotations - #295

Open
onehot123 wants to merge 3 commits into
OpenBMB:mainfrom
onehot123:fix/skill-reference-annotations
Open

onehot123 wants to merge 3 commits into
OpenBMB:mainfrom
onehot123:fix/skill-reference-annotations

Conversation

@onehot123

@onehot123 onehot123 commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

Fix HTTP 400 on skill import when an existing reference is followed by a full-width parenthesized annotation:

references/gongwen_rules.yaml(GB/T 9704-2012)

The validator previously included (GB/T in the filename.

  • Prefer exact file paths, preserve parentheses in filenames, and reject missing full filenames even when a shorter prefix exists.
  • Respect Markdown link boundaries. For bare prose, trim full-width annotations only when they span whitespace, close on the same line, and have no filename continuation; ambiguous groups remain literal.
  • Add regression coverage for reference extraction, imports, and Markdown-only updates. Changes are limited to backend validation and tests.

Verification

99 passed:

backend/.venv/bin/python -m pytest \
  backend/tests/test_general_skill_references.py \
  backend/tests/test_general_skill_artifacts.py \
  backend/tests/test_general_skill_provider_runtime.py \
  backend/tests/test_general_skill_concurrency.py -q
  • Ruff lint and formatting checks pass for the new test module; git diff --check passes.

The wider test_general_skills.py run was interrupted during sandbox runtime download. No live model API or browser UI test was run.

@onehot123 onehot123 changed the title fix(skills): delimit reference paths before full-width annotations fix(skills): preserve filenames when parsing reference annotations Oct 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant