Files
claude-desktop-debian/scripts/cowork-patch-markers.tsv

30 lines
2.0 KiB
Plaintext
Raw Normal View History

verify(cowork): static-grep shipped asar for PR #555 markers (#559) (#575) * verify(cowork): static-grep shipped asar for PR #555 markers D6 of #559's followup plan: post-build check that greps the shipped app.asar for 9 known cowork patch markers and exits non-zero if any are missing. Catches the half-patched-asar failure mode from PR #555, where two of three failed gates had no else branch and the build log showed "Applied 10 cowork patches" instead of warning. - scripts/cowork-patch-markers.tsv: single source of truth. Tab-separated name<TAB>pcre<TAB>sample. Both verify and BATS read it. - scripts/verify-cowork-patches.sh: accepts a .js, an .asar (npx @electron/asar extract), or a directory containing app.asar.contents/.vite/build/index.js. Exits 0/1/2. - tests/verify-cowork-patches.bats: regex-matches-sample integrity, positive full fixture, per-marker negative fixtures, input-shape coverage. 9 new BATS cases. - .github/workflows/build-amd64.yml: runs verify against the deb build's asar. Pinned to deb because the patched JS is identical across formats. Validated end-to-end against the pinned 1.5354.0 installer: unpatched -> 9/9 miss; cowork.sh patched -> all 9 present. Refs #559. Co-Authored-By: Claude <claude@anthropic.com> * verify(cowork): share TSV parser between verify.sh and BATS Realises the library-mode plumbing the previous commit added but didn't use: BATS now sources verify-cowork-patches.sh and calls load_markers, so a TSV format change cannot desync the two consumers. Drops the duplicate parser in tests/verify-cowork-patches.bats. Also tightens main()'s loop (for over indexed while, drop redundant missing counter) and the BATS index loops. Behaviour-preserving; bats tests/verify-cowork-patches.bats still 9/9. Co-Authored-By: Claude <claude@anthropic.com> * rename: verify-cowork-patches → verify-patches (generic) Rename the verify infra to make its generic intent explicit. Per sabiut's review note on #575, the script + TSV are reusable for non-cowork patch sets in principle — drop "cowork" from the script and BATS filenames to reflect that, and accept an optional second arg for the marker TSV path so other patch sets can plug their own TSV in without forking the script. The TSV itself stays cowork-specific (`cowork-patch-markers.tsv`) because its contents are cowork markers; the script defaults to it so existing CI keeps working without changes beyond the rename. Routing implication noted by sabiut: filename now lives under `/tests/` → @sabiut codeowner mapping (intentionally; the verify infra is generic). Cowork-specific marker changes still touch the TSV under `/scripts/`, which routes to @aaddrick/@RayCharlizard via the cowork-* CODEOWNERS rule. Co-Authored-By: Claude <claude@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
2026-05-05 07:25:22 -04:00
# Cowork patch markers — single source of truth.
#
# Format:
# <name><TAB><pcre_pattern><TAB><sample>
# Lines starting with '#' and blank lines are ignored.
#
# Each row names a post-patch fingerprint of patch_cowork_linux() in
# scripts/patches/cowork.sh. Both verify-patches.sh and
# tests/verify-patches.bats consume this file, so adding a marker
# here adds it to the runtime check and the test matrix at the same
# time.
#
# Columns:
# name — kebab-case id; surfaces in verify output and BATS names.
# pattern — PCRE matched against the shipped index.js by `grep -P`.
# sample — concrete string the pattern matches; BATS uses it to
# build positive and per-marker negative fixtures.
#
# The 9 markers below correspond 1:1 with the smoke-test set defined
# in issue #559 (PR #555 retrofit, deliverable D6).
vmclient-log-gate process\.platform==="linux"\)\s*\?\s*"vmClient \(TypeScript\)" (F||process.platform==="linux")?"vmClient (TypeScript)"
vm-assignment-linux-gate process\.platform==="linux"\)\?\(?[\w$]+=\{vm:[\w$]+\} (F||process.platform==="linux")?N={vm:M}
unix-socket-path process\.platform==="linux"\?\(process\.env\.XDG_RUNTIME_DIR\|\|"/tmp"\)\+"/cowork-vm-service\.sock" process.platform==="linux"?(process.env.XDG_RUNTIME_DIR||"/tmp")+"/cowork-vm-service.sock"
empty-linux-bundle-manifest linux:\{x64:\[\],arm64:\[\]\} ,linux:{x64:[],arm64:[]}
getdownloadstatus-suppression getDownloadStatus\(\)\{return process\.platform==="linux"\?[\w$]+\.NotDownloaded getDownloadStatus(){return process.platform==="linux"?Z.NotDownloaded
econnrefused-on-linux process\.platform==="linux"&&[\w$]+\.code==="ECONNREFUSED" (n.code==="ENOENT"||process.platform==="linux"&&n.code==="ECONNREFUSED")
cowork-daemon-pid global\.__coworkDaemonPid global.__coworkDaemonPid=_c.pid
cowork-linux-daemon-shutdown cowork-linux-daemon-shutdown name:"cowork-linux-daemon-shutdown"
sharedcwdpath-threadthrough sharedCwdPath:this\.sessions\.get\( sharedCwdPath:this.sessions.get(t)?.userSelectedFolders?.[0]