Skip to content

feat: office bundle ETag revalidation and --force-skills passthrough - #236

Merged
quickbeard merged 2 commits into
mainfrom
feat/office-etag-and-force-skills
Aug 4, 2026
Merged

feat: office bundle ETag revalidation and --force-skills passthrough#236
quickbeard merged 2 commits into
mainfrom
feat/office-etag-and-force-skills

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Summary

Two follow-ups to the manifest removal (#234), prompted by the bundle refresh that shipped the hardened xlsx skill:

1. ETag-based staleness detection. Dropping the manifest left no way to notice a republished bundle — an existing codev-office-<os>.zip was reused as-is, so users who downloaded before a refresh kept installing stale contents (including the just-fixed skill zips). downloadFile now persists the server's ETag next to each file (<dest>.etag) and revalidates:

  • Finished file + stored ETag → If-None-Match probe: 304 keeps the local copy (one cheap round-trip, no re-download); an ETag change re-downloads; an unreachable/erroring server keeps the local copy (offline-safe); no ETag on record (manually copied file, pre-ETag download) trusts the file as-is — no behavior change for existing setups.
  • Resume → If-Range alongside Range, closing a real corruption hole: a .partial from an older publish previously had new-object bytes spliced onto it with nothing to catch it (the outer sha256 went away with the manifest); now the server answers 200 on mismatch and the existing start-over branch discards the stale bytes.

The truth lives on the object itself (MinIO serves ETags on every object), so unlike a manifest there is no publish-side contract that can drift.

2. --force-skills passthrough. The setup scripts' --force-skills/-ForceSkills flag is what existing installs need to pick up refreshed skills, but codevhub skill office had no way to forward it. Now: codevhub skill office --force-skills. Usage string and codevhub help updated.

Together these complete the update path for the installed base: codevhub skill office --force-skills refetches the script, notices the republished bundle via ETag, re-downloads it, and replaces the installed skills with the refreshed ones.

Test plan

  • pnpm fix / typecheck clean; office+download suites: 38 tests pass, including 4 new ETag cases (304 reuse with exactly one probe request, republish re-download, no-ETag trust with zero requests, If-Range restart across a republish) against a test server with MinIO-style conditional semantics
  • pnpm build && node dist/index.js --version smoke-passes; full suite + build passed in the pre-commit hook
  • Live: run twice against the bucket — second run must probe (304) and reuse; republish a bundle and confirm re-download

🤖 Generated with Claude Code

Removing the manifest left no way to detect a republished bundle: an
existing zip was reused as-is, so users who downloaded before a bundle
refresh kept installing stale contents. Persist the server's ETag next
to each download and revalidate:

- finished file + stored ETag: If-None-Match probe; 304 keeps the local
  copy, an ETag mismatch re-downloads; server unreachable or erroring
  keeps the local copy; no ETag on record (manually copied file) trusts
  it as-is
- resume: If-Range alongside Range, so a partial from an older publish
  restarts cleanly instead of splicing stale bytes

Also pass --force-skills / -ForceSkills through to the setup scripts,
the flag existing installs need to pick up refreshed skills.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
It appeared both in the passthrough list and in its own explanation,
reading as a duplicate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard
quickbeard merged commit 9d29ce2 into main Aug 4, 2026
2 of 3 checks passed
@quickbeard
quickbeard deleted the feat/office-etag-and-force-skills branch August 4, 2026 13:16
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