Skip to content

fix(compile): resolve pickle error and merge skill_name changes - #3738

Open
fujiajie666 wants to merge 1 commit into
mainfrom
fix/compile_read
Open

fix(compile): resolve pickle error and merge skill_name changes#3738
fujiajie666 wants to merge 1 commit into
mainfrom
fix/compile_read

Conversation

@fujiajie666

Copy link
Copy Markdown
Collaborator

Description

Fixes the OpenViking ov compile failure [INTERNAL] cannot pickle '_thread.lock' object,
and merges the upstream skill_name prompt changes from commit 6aab476. Also relaxes the
compile renderer's reserved-filename set so Skill-defined outputs like index.md are no
longer rejected.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Fix cannot pickle '_thread.lock' object in BotCompileService: replace the full
    model_copy(deep=True) (which deep-copied a VLMConfig holding an unpicklable
    threading.Lock) with a shallow copy that only resets skills and deep-copies the
    sandbox subtree.
  • Thread a skill_name parameter through _build_prompts and add a skill_read_rule
    instructing the agent to read Skill package files via read_file under
    skills/<skill-name>/ instead of openviking_* tools (merged from upstream 6aab476).
  • Add the corresponding Skill-workspace read redirect hint/error in
    agent/tools/compile.py and a design-doc note in docs/design/ov-compile-design.md.
  • Shrink _RESERVED_FILENAMES in compile/renderer.py to only .abstract.md /
    .overview.md, so Skill-produced files such as index.md are allowed.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

bot/tests/test_compile.py — 83 passed locally (pytest bot/tests/test_compile.py),
including new tests for skill-workspace read redirection and the skill_name prompt wiring.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

Root cause of the pickle error: a threading.Lock private attribute was added to
VLMConfig (_media_semaphore_lock) on 8-3, which made any model_copy(deep=True) of the
compile task config fail. The chat path is unaffected because it never deep-copies the
config; this change is compile-only.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant