Skip to content

Release CU: stage-batch5 — 2-PR low-risk batch (v0.51.123) — gzip+ETag static caching / Open in VS Code#2816

Merged
nesquena-hermes merged 3 commits into
masterfrom
release/stage-batch5
May 24, 2026
Merged

Release CU: stage-batch5 — 2-PR low-risk batch (v0.51.123) — gzip+ETag static caching / Open in VS Code#2816
nesquena-hermes merged 3 commits into
masterfrom
release/stage-batch5

Conversation

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Release CU — v0.51.123 — stage-batch5 — 2-PR low-risk batch

Fifth batch from the May 24 sweep. Two well-tested contributor PRs, both pre-cleared by Opus advisor:

PR Author LOC Surface Risk
#2779 @v2psv +346/-4 api/routes.py _serve_static() low — strictly /static/* scope, in-process cache with (size, mtime_ns) invalidation, 11 tests
#2787 @munim +508/-40 api/routes.py + static/ui.js + i18n low — context-menu addition, uses existing safe_resolve traversal guard, 26 tests

Cherry-picks

d20da832 fix(static): tighten cache validators and 304 headers           (#2779)
7999d1c7 feat(workspace): add Open in VS Code action for files (#2735)   (#2787)
79a3ac37 Stamp CHANGELOG for v0.51.123

Conflict resolution + cherry-pick fix-ups

PR #2779's cherry-pick onto current master had a real merge conflict in _serve_static() because the function body was entirely rewritten. Resolution:

  1. Took theirs (PR replaces the old no-store wfile.write(raw) impl with the new cached wfile.write(body) impl)
  2. Caught a regex slip where the tail wfile.write(raw) was left from master; corrected to wfile.write(body) so gzipped content is actually transmitted
  3. Folded missing import gzip at api/routes.py:9 into the contributor's commit via git rebase --autosquash

Pre-Opus gate

Check Result
Python ast.parse + node -c on all touched PASS
Merge-marker grep clean
New regression tests (37 across 2 files) pass in isolation
Full pytest 6333 passed, 7 skipped, 0 failed (up 37 from 6296 — matches new test count)

Opus advisor verdict

PR Decision Notes
#2779 SHIP Cache key safely bounded behind two sandbox checks; parse_qs v-param logic correct including empty-string and multi-value edge cases; tests pin both header policy and (size, mtime_ns) invalidation. Memory ceiling (~3.5 MB) is fine.
#2787 SHIP safe_resolve runs BEFORE the path is handed to Popen, with full .resolve() normalization; Popen pattern is byte-for-byte the model used by _handle_file_reveal; Docker prefix rewrite is post-validation and admin-trusted.

What's NOT in this batch

Routed to Batch 6 (Windows stack rebase) or held for review:

v2psv and others added 3 commits May 24, 2026 04:26
)

Right-click any workspace file, folder, or root now shows
'Open in VS Code' alongside the existing Reveal in File Manager action.

- POST /api/file/open-vscode: resolves path via safe_resolve, finds VS
  Code via shutil.which() with fallbacks for macOS (/usr/local/bin/code,
  app bundle CLI), Linux (/usr/bin/code, /snap/bin/code), and Windows
  (%LOCALAPPDATA% and %PROGRAMFILES% user/system installs). Returns a
  descriptive error if not found rather than a bare OS error.
- Optional vscode block in config.yaml: command (default: code),
  host_path_prefix + container_path_prefix for Docker path mapping.
- i18n: open_in_vscode and open_in_vscode_failed translated in all 10
  locales (it, ja, ru, es, de, zh-CN, zh-TW, pt, ko).
- 26 tests in tests/test_2735_open_in_vscode.py covering source wiring,
  command resolution, i18n completeness, and live endpoint error paths.
…isk batch)

Cherry-picked PRs:
- #2779 (v2psv) — gzip + ETag/304 + immutable cache for fingerprinted /static/*
- #2787 (munim) — Open in VS Code workspace file browser action (closes #2735)

Conflict resolution: kept ours CHANGELOG (3 PRs all added Unreleased entries).
For #2779's _serve_static overhaul, took theirs (PR replaces function body).
Folded missing 'import gzip' into the #2779 commit via fixup+autosquash.
@nesquena-hermes nesquena-hermes merged commit cb270f3 into master May 24, 2026
3 checks passed
@nesquena-hermes nesquena-hermes deleted the release/stage-batch5 branch May 24, 2026 04:36
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.

3 participants