Skip to content

docs: validate recommended deployment snippets - #286

Draft
matthewygf wants to merge 2 commits into
mainfrom
codex/fix-recommended-guide-snippets
Draft

matthewygf wants to merge 2 commits into
mainfrom
codex/fix-recommended-guide-snippets

Conversation

@matthewygf

@matthewygf matthewygf commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Problem

PR #285 added two deterministic command failures to the recommended deployment guides:

  1. The DSv4 P2P startup script enables set -euo pipefail and then expands $LD_PRELOAD directly. On a clean host/container where the variable is unset, Bash exits with LD_PRELOAD: unbound variable before LMCache or vLLM starts.
  2. The GLM-5.2 benchmark command requests v0.4.4· (with a trailing Unicode middle dot) instead of the existing upstream v0.4.4 tag.

The first failure is the same shell pattern addressed for the dsv4_support_045 documentation in #279, but #279 targets a different base branch and different file paths, so it cannot repair the new main guide.

Fix

  • Preserve an existing preload list with Bash's nounset-safe conditional expansion.
  • Correct the LMCache tag to v0.4.4.
  • Add documentation regression tests that scan recommended shell snippets for unsafe LD_PRELOAD expansion under nounset and reject non-ASCII/unsafe documented clone refs.

Validation

  • Reproduced the original unset-variable command: exit 127 with LD_PRELOAD: unbound variable.
  • Corrected expansion passes with LD_PRELOAD both unset and pre-populated.
  • Confirmed upstream refs/tags/v0.4.4 exists with git ls-remote.
  • Both new regression functions pass when invoked directly.
  • python -m py_compile tests/test_documentation_snippets.py passes.
  • SPDX header check passes.
  • Repository-pinned isort 6.0.1, ruff 0.11.7, and ruff-format checks pass.
  • git diff --check origin/main passes.
  • GitHub Code Quality passes.

Risk

Low. This changes two documentation commands and adds standard-library-only tests; no runtime code is modified.

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