Skip to content

fix: reuse cached docs after resolving a fallback version #1

Description

@wlgys8

Problem

When the target MotrixSim version has no exact docs tag, the skill checks the local cache only under the original target version before resolving a fallback.

For example:

  • target runtime: 0.9.1.dev114058
  • exact local directory: ~/.motrixsim/docs-md/0.9.1.dev114058 is absent
  • closest compatible docs tag: v0.9.0
  • valid local cache: ~/.motrixsim/docs-md/0.9.0 already exists

The current workflow enters the GitHub fallback after the exact cache miss and clones/checks out v0.9.0 without re-checking the cache for the resolved fallback version.

Cause

The instructions use one ambiguous <version> value and combine two separate decisions:

  1. resolving the docs version for the target runtime
  2. choosing the source for that resolved docs version

The cache lookup happens before fallback resolution and is not repeated afterward.

Expected behavior

After resolving an exact or fallback docs tag, the agent must normalize it to a resolved docs version and validate ~/.motrixsim/docs-md/<resolved-docs-version> before cloning or fetching. It should clone only when that exact cache is missing or invalid.

Acceptance criteria

  • Distinguish the target runtime version from the resolved docs version.
  • Check the exact target-version cache first.
  • Resolve an exact or closest compatible upstream tag without cloning the repository.
  • Re-check the cache using the resolved docs version.
  • Treat a cache as valid when both api_md/index.md and mjcf_md/index.md exist.
  • Clone or update the docs repository only when the resolved-version cache is missing or invalid.
  • Document the 0.9.1.dev114058 to 0.9.0 case explicitly.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions