From 38ff65941d6cd771700480fd2e6c88dad6a01c24 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Sat, 2 May 2026 18:50:07 +0300 Subject: fix(swap): address Copilot review feedback on swap infrastructure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Category D — drop obsolete canary mechanism settings: - conf.py: remove '**/md-*.md' from exclude_patterns (no canaries left) - Makefile: replace malformed '*/_build/*' with '$(BUILDDIR)/**' and drop the '*/md-*' ignore (canary files no longer exist) Category C — script robustness: - import_myst.py: * list_myst_files() now raises SystemExit on git ls-tree failure instead of silently returning [] (would have masked typo'd --source refs) * list_rst_files() skips _build/ when scanning for .rst stems * import_page() rejects stems containing '..' or absolute paths and re-checks that the resolved destination stays under docs_dir * --dry-run uses a separate "would_import" counter; summary line now distinguishes dry-run from actual imports - swap_sources.py: * parse_swap_list() reads with explicit encoding='utf-8' * do_restore() validates state file version + entry shape before renaming files; raises with actionable message on corruption * State file reads/writes use explicit encoding='utf-8' throughout _swap.txt: - Wrap long comment line to satisfy 80-character doc-linter limit 🤖 Generated by [robots](https://vyos.io) --- docs/Makefile | 3 +-- docs/_swap.txt | 3 ++- docs/conf.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile index a2305e15..29ef3906 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -41,8 +41,7 @@ pdf: swap livehtml: swap @trap '$(SWAP) --restore' EXIT; \ sphinx-autobuild --host $(AUTOHOST) --port $(AUTOPORT) \ - --ignore '*/_build/*' \ - --ignore '*/md-*' \ + --ignore '$(BUILDDIR)/**' \ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) defaultvalue: export VYOS_DEFAULT=True diff --git a/docs/_swap.txt b/docs/_swap.txt index cee6841e..43e32cc5 100644 --- a/docs/_swap.txt +++ b/docs/_swap.txt @@ -113,7 +113,8 @@ installation/virtual/eve-ng configexamples/site-2-site-cisco contributing/upstream-packages -# Newly added 2026-04-29 (post cfgcmd/opcmd single-line body fix, BackstopJS <5%) +# Newly added 2026-04-29 (post cfgcmd/opcmd single-line body fix, +# BackstopJS <5%) configuration/policy/as-path-list configuration/policy/community-list configuration/policy/extcommunity-list diff --git a/docs/conf.py b/docs/conf.py index 62982333..c13397a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -88,7 +88,7 @@ gettext_uuid = False # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', '_include/vyos-1x', '**/md-*.md'] +exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', '_include/vyos-1x'] import pathlib _build = pathlib.Path(__file__).parent / '_build' -- cgit v1.2.3