Skip to content

Make the site easier to build and test in container environments - #89

Merged
emilybache merged 1 commit into
mainfrom
claude/hello-grjy1h
Jul 3, 2026
Merged

Make the site easier to build and test in container environments#89
emilybache merged 1 commit into
mainfrom
claude/hello-grjy1h

Conversation

@nitsanavni

Copy link
Copy Markdown
Member

This makes ./build_and_run / ./build_and_test work out of the box in container environments (remote dev containers, CI sandboxes) where they previously failed, and fixes the site's search in offline/network-restricted setups.

Changes

  • New unix build_and_run script — counterpart to the existing Windows-only build_and_run.cmd. Runs bundle install and serves the site with livereload, binding to 0.0.0.0 so it's reachable from outside a container.
  • Gem bin directory prepended to PATH in both build_and_run and build_and_test, via $(ruby -e 'print Gem.bindir'). In some environments the gem binstubs aren't on PATH, making bundle exec jekyll fail with "command not found".
  • Search bar tests honor CHROME_BIN — environments without a standard Chrome install can point Selenium at their browser binary (e.g. CHROME_BIN=/opt/pw-browsers/chromium). No behavior change when the variable is unset.
  • simple-jekyll-search.min.js vendored into assets/js/ (4 KB, MIT-licensed, unchanged from the jsdelivr 1.10.0 build) instead of loading it from the CDN. Search now works offline and in network-restricted environments, and the site drops an external dependency. This also fixes test_search_bar_shows_results hanging for 100 s where the CDN is unreachable.
  • AGENTS.md documents ./build_and_run and the CHROME_BIN convention.

Testing

  • ./build_and_run serves the site on port 4000 from a clean shell in a restricted container.
  • ./build_and_test passes all 6 tests in ~9 s (previously: 2 Selenium errors, and after fixing those, a 2-minute CDN timeout).
  • Verified search interactively in a real browser with the vendored script: typing "approval" returns "Approval Testing Legacy Code series".

🤖 Generated with Claude Code

https://claude.ai/code/session_01JfzDDfEyxHvnEoQKJvdcLV


Generated by Claude Code

- Add a unix build_and_run script (counterpart to build_and_run.cmd)
  that installs gems and serves the site with livereload
- Prepend the gem bin directory to PATH in both scripts, since some
  environments don't have it on PATH and `bundle exec jekyll` fails
  with "command not found"
- Let the search bar tests pick up the browser binary from CHROME_BIN
  for environments without a standard Chrome install
- Serve simple-jekyll-search from assets/js instead of the jsdelivr
  CDN, so search works offline and in network-restricted environments
- Document all of this in AGENTS.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JfzDDfEyxHvnEoQKJvdcLV
@emilybache
emilybache merged commit cee38d4 into main Jul 3, 2026
3 checks passed
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