• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jhheider / scriptbox / 29622679289

18 Jul 2026 12:15AM UTC coverage: 73.393% (-3.7%) from 77.067%
29622679289

push

github

jhheider
subscripts: fix review-blocking bugs (false "frozen" reports + cache race)

Senior-engineer pre-release review found reproduced bugs in the subscripts
feature; all fixed:
- Quoted `source "./lib.sh"` was never frozen but reported (frozen): brush keeps
  quotes in Word.value. Now dequoted via brush_parser::unquote_str before
  resolve/is_literal, and the report is built from the ACTUAL edits, so a site is
  only labeled frozen/wrapped when a rewrite really happened.
- Same file sourced twice froze only the first (the visited set conflated dedup
  with cycle detection). Now a `frozen: canonical->fd` map dedups (reusing the
  same fd), separate from an `in_progress` cycle guard.
- Relative source resolved only against the launcher CWD, risking a silent
  WRONG-FILE substitution on a name collision. Now resolves against the script's
  own dir AND cwd and refuses (reports ambiguous, leaves unfrozen) when they
  disagree.
- Cache write was an unlocked check-then-act; parallel branches raced to EACCES
  (~15%). Now writes to a private temp and atomically renames (snapshot last),
  0/80 under the stress repro.
- Walker now descends `case` branches (a common dispatch idiom that was silently
  skipped). Added a source-recursion depth cap and a `pin`/`hash` warning when an
  interpreter is set only in (pin-excluded) frontmatter.

PM fixes too: --help now reports subscripts availability at runtime (prebuilt
binaries include it); dropped the redundant --no-argv0-rewrite from --help.

Regression-tested (parallel freeze-tree, report honesty, dequote/case unit).
Both configs pass (default 51+10, subs 52+15), clippy/fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014psyX18vgHn4UkMwCtZqff

40 of 138 new or added lines in 4 files covered. (28.99%)

32 existing lines in 1 file now uncovered.

902 of 1229 relevant lines covered (73.39%)

6.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

27.81
/src/subscripts.rs


Build SHA Not Found

The commit SHA "33c02b2726d7e0588e9fb782b29b7c4ca170fef7" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc