Skip to content

feat(auto-sync): migrate configuration and workflow to Loopwright Taskpack 2.0 - #425

Merged
thxCode merged 2 commits into
mainfrom
autosync-taskpack-v2
Nov 20, 2026
Merged

thxCode merged 2 commits into
mainfrom
autosync-taskpack-v2

Conversation

@thxCode

@thxCode thxCode commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrate .auto-sync/* and .github/workflows/auto-sync.yml to Loopwright Taskpack 2.0:

  • Explicit Taskpack 2.0 scope globs: update spec.scope.writable (pack/cuda/**, pack/rocm/**, pack/cann/**, plus exact single-file entries including .auto-sync/proposal.json) and spec.scope.protected (pack/cann/patches/hixl/**), and enforce explicit /** directory glob rules in validate_candidate.py.
  • Strict execution & digest lockfile: declare spec.execution (mode: strict, digests.pinDigests: true) with .auto-sync/digests.lock.json, set allowReadOnlyGitHubToken: false and explicit toolchainPaths on runner-static-checks, require the directory-mounted validate_candidate.py in validate_candidate.sh (-B), and verify scope and published support rows against $LOOPWRIGHT_BASE_DIR when .git is unmounted.
  • Workflow alignment (Auto Sync): rename the workflow to Auto Sync, switch gpustack/loopwright@main to mode: auto (check-only no_change verification with zero model calls when upstreams match .auto-sync/proposal.json; force or pack-run-url dispatches candidate), set allow-privileged-execution: 'false' and allow-workflow-writes: 'false', verify the default-branch ref before execution, and remove obsolete upstream-records / allow-custom-base-url glue.

Verification

  • loopwright digest sync --taskpack .auto-sync/taskpack.yaml --repo . --check --json
  • LOOPWRIGHT_CANDIDATE_DIR="$PWD" uv run bash .auto-sync/checks/validate_candidate.sh
  • uv run python -B .auto-sync/checks/lint_workflows.py .github/workflows/auto-sync.yml .github/workflows/pack.yml .github/workflows/ci.yml
  • uv run pytest tests/gpustack_runner tests/pack
  • uv run mkdocs build --strict
  • uv run pre-commit run --all-files

…kpack 2.0

Migrate .auto-sync/taskpack.yaml, .auto-sync/instructions.md, .auto-sync/checks/*, and .github/workflows/auto-sync.yml to Loopwright Taskpack 2.0:
- Adopt explicit Taskpack 2.0 scope globs (pack/{cuda,rocm,cann}/** and protected pack/cann/patches/hixl/**) and reject bare directory scope entries in validate_candidate.py.
- Declare spec.execution (mode: strict, digests.pinDigests: true) with .auto-sync/digests.lock.json, set allowReadOnlyGitHubToken: false and explicit toolchainPaths on runner-static-checks, and support LOOPWRIGHT_BASE_DIR under directory-mounted command.v1 verification.
- Rename workflow to Auto Sync, switch gpustack/loopwright@main to mode: auto with explicit strict dual-key flags, verify the default-branch checkout ref, and remove obsolete dry-run upstream-records and custom-base-url glue.

Signed-off-by: thxCode <thxcode0824@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the release automation to support Taskpack 2.0, introducing a deterministic SHA-256 lockfile (digests.lock.json) to pin instructions and checks, strict execution mode, and explicit glob-based scope rules. It enhances validate_candidate.py to support glob scope classification and offline validation against a baseline snapshot directory when .git is absent. Feedback on the changes suggests using filecmp.cmp to avoid loading entire files into memory during validation, and pre-emptively cleaning up __pycache__ in tests to prevent fragile test failures.

Comment thread .auto-sync/checks/validate_candidate.py Resolved
Comment thread tests/pack/test_validate_candidate.py Resolved
…ght Taskpack 2.0

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Review Feedback Summary

All feedback items from the review round have been triaged and addressed:

Item Location Verdict Outcome
Review summary (5990253912) Top-level review Summary of inline items Covered by the two inline fixes below (0 suppressed items).
Inline comment (4640625892) .auto-sync/checks/validate_candidate.py (_validate_base_dir_scope) Confirmed engineering issue (memory efficiency) Fixed — replaced full-buffer read_bytes() comparison with chunked filecmp.cmp(cand_f, base_f, shallow=False) (with filecmp.clear_cache()), refreshed .auto-sync/digests.lock.json, and added same-length content modification coverage in tests/pack/test_validate_candidate.py.
Inline comment (4640625910) tests/pack/test_validate_candidate.py (test_shell_entrypoint_ignores_candidate_checks_script) Confirmed engineering issue (test isolation) Fixed — removed any pre-existing .auto-sync/checks/__pycache__ directory prior to running validate_candidate.sh before asserting that -B creates no bytecode cache.

@thxCode
thxCode merged commit 21558e2 into main Nov 20, 2026
7 checks passed
@thxCode
thxCode deleted the autosync-taskpack-v2 branch November 20, 2026 09:45
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