Skip to content

fix(openscience): harden atlasFetch signal, version coercion, atomic temp, env prefixes#123

Merged
Aayam Bansal (aayambansal) merged 1 commit into
mainfrom
fix/openscience-index-hardening
Jul 7, 2026
Merged

fix(openscience): harden atlasFetch signal, version coercion, atomic temp, env prefixes#123
Aayam Bansal (aayambansal) merged 1 commit into
mainfrom
fix/openscience-index-hardening

Conversation

@aayambansal

Copy link
Copy Markdown
Member

Four defensive fixes in openscience/index.ts (from the audit):

Typecheck + full backend suite (936 tests) green.

…omic temp, env prefixes

Four defensive fixes in the managed-account module:

- atlasFetch now COMBINES a caller-supplied signal with the timeout via
  AbortSignal.any instead of replacing it, so passing a signal never drops
  the 60s hang guard. (#46)
- refreshIfStale coerces a numeric-string sync version ({"v":"5"}) instead
  of collapsing it to null — otherwise cached_v never updates and the CLI
  keeps deferring the background sync forever. (#47)
- atomicWrite's temp path is unique per call (pid + uuid), so two concurrent
  syncs in the same process can't write the same temp file, interleave, and
  publish a torn synced-env.json. (#13)
- filterEnvForSubprocess matches SAFE_ENV_PREFIXES exactly for plain names and
  only prefixes entries ending in '_' (LC_, XDG_), so HOME no longer matches
  HOMEBREW_GITHUB_API_TOKEN etc. (#49)
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscience Ready Ready Preview, Comment Jul 7, 2026 3:39am

Request Review

@aayambansal Aayam Bansal (aayambansal) merged commit abe76c6 into main Jul 7, 2026
11 checks passed
@aayambansal Aayam Bansal (aayambansal) deleted the fix/openscience-index-hardening branch July 7, 2026 03:40
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