Skip to content

chore(devx): R2 Phase A - Linux script portability, qtest repairs, doc truth pass - #412

Merged
pftg merged 1 commit into
masterfrom
claude/devx-r2-phase-a
Jul 31, 2026
Merged

chore(devx): R2 Phase A - Linux script portability, qtest repairs, doc truth pass#412
pftg merged 1 commit into
masterfrom
claude/devx-r2-phase-a

Conversation

@pftg

@pftg pftg commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

First PR of DevX Round 2 (approved plan) — the ship-blockers found by the post-Round-1 audit.

Scripts dead on Linux — fixed

bin/test, bin/dev, bin/build, and bin/hive had #!/usr/bin/env sh shebangs with bash-only set options (pipefail, -E). dash (Debian/Ubuntu /bin/sh) treats a bad option to the set special builtin as fatal — the scripts exited 2 before their first real line. That means the documented primary entry points (bin/test per README/CONTRIBUTING/SETUP, bin/dev for the dev server) were unusable on every Linux host. Same class Phase 1 fixed in bin/dc/bin/docked — the sweep just wasn't exhaustive.

New guard: test/unit/bin_scripts_test.rb fails CI on any sh-shebang script under bin/ that uses pipefail/-E (plus a missing-shebang check). It caught bin/hive on its very first run — the class is real.

bin/dtest arg bug

t "$@" set the container command to the bare .rb path, so bin/dtest test/system/foo_test.rb tried to exec the test file itself. Now t bin/test "$@", mirroring bin/dtest-all.

bin/hugo-dev retired

It passed --environment development to Hugo but never exported HUGO_ENVIRONMENT, so PostCSS saw production and rake dev paid the full PurgeCSS+cssnano chain on every CSS rebuild — against a hugo_stats.json that dev mode never regenerates. rake dev now runs bin/dev (which exports the env correctly). One dev script, the working one.

bin/qtest repairs

  • privacy-policy key added — editing critical/privacy-policy-critical.css previously hard-aborted qtest with "unknown page key".
  • Dead test/system/pages/careers_page_test.rb branch removed (directory doesn't exist).
  • Its private dirty-baseline guard now matches the canonical one: honors ALLOW_DIRTY_SCREENSHOTS=1 and points at bin/rake test:screenshots:reset.

Doc truth pass #2

  • README: 4 broken links fixed (CI-CD → real 50.02 path, dev.to → real 80.01 path, nonexistent docs-overview row dropped, LICENSE file link → CC BY-SA URL); fictional coverage-report section deleted (SimpleCov is never loaded anywhere); dead SELENIUM_BROWSER env replaced with the real CHROME_BIN/CHROMEDRIVER_PATH/ALLOW_DIRTY_SCREENSHOTS vars; command table now lists bin/qtest, bin/dtest-all, bin/setup-test-env, rake test:screenshots:reset.
  • docs/SETUP.md: the "bare-metal Linux diffs are environmental" claim predated Phase 4 and steered people away from the pinned stack — replaced with the bin/setup-test-env flow; apt-get install chromium row replaced (unpinned distro Chromium is exactly what baselines must not be compared against).
  • .okf: ci-gates.md's Alpine/musl rationale for excluding visual CI marked obsolete (image is Debian/glibc now; R2 Phase B plans the gate's return, report-only first); test-gates.md + workflows/testing.md refreshed; dated log entry.

Verification

  • test/unit/bin_scripts_test.rb: green after fixes; red when a shebang is reverted (proven — it flagged bin/hive before I fixed it).
  • bash -n clean on all touched scripts; bin/test --help now reaches the Ruby runner on this dash-default container (previously: set: Illegal option -o pipefail, exit 2).
  • bin/qtest loads and resolves the new privacy-policy key; unknown-key abort path unchanged for genuinely unknown files.
  • Both new README link targets verified to exist.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH


Generated by Claude Code

…c truth pass

bin/test, bin/dev, bin/build, bin/hive used sh shebangs with bash-only
set options (pipefail/-E); dash - /bin/sh on Debian/Ubuntu - exits 2
before the first real line, so the documented primary entry points were
dead on every Linux host. Shebangs fixed to bash (same pattern as the
Phase 1 bin/dc/bin/docked fix). New test/unit/bin_scripts_test.rb guards
the class in CI - it caught bin/hive on its first run.

bin/dtest passed args as the raw container command (`t "$@"`), so
`bin/dtest path.rb` exec'd the .rb file instead of running it through
the test runner; now `t bin/test "$@"` (mirrors bin/dtest-all).

bin/hugo-dev retired: it never exported HUGO_ENVIRONMENT, so `rake dev`
ran the FULL production PostCSS chain (PurgeCSS+cssnano) on every CSS
rebuild - against a stats file dev mode never writes. `rake dev` now
runs bin/dev, which sets the env correctly.

bin/qtest: `privacy-policy` key added (touching
critical/privacy-policy-critical.css hard-aborted as an unknown key);
dead test/system/pages/careers_page_test.rb branch removed; dirty-
baseline guard now honors ALLOW_DIRTY_SCREENSHOTS=1 and points at
`bin/rake test:screenshots:reset`, matching the canonical guard.

Doc truth pass #2: README - 4 broken links fixed (CI-CD, dev.to,
docs-overview row dropped, LICENSE -> CC URL), fictional coverage-report
section removed (SimpleCov is never loaded), dead SELENIUM_BROWSER env
replaced with the real CHROME_BIN/CHROMEDRIVER_PATH/ALLOW_DIRTY vars,
command table now lists qtest/dtest-all/setup-test-env/screenshots:reset.
docs/SETUP.md - bare-metal Linux runs ARE comparable via
bin/setup-test-env (the old claim predated Phase 4); chromium row
replaced with the pinned CfT flow. .okf: ci-gates' Alpine/musl premise
marked obsolete (R2 Phase B plans the CI visual gate), test-gates +
testing.md refreshed, dated log entry added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@pftg, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ddd73610-81df-49e4-a0f6-b4708e3ffbbb

📥 Commits

Reviewing files that changed from the base of the PR and between d58b4cd and 35fd415.

📒 Files selected for processing (16)
  • .okf/build/ci-gates.md
  • .okf/build/test-gates.md
  • .okf/log.md
  • .okf/workflows/testing.md
  • README.md
  • Rakefile
  • bin/build
  • bin/dev
  • bin/dtest
  • bin/hive
  • bin/hugo-dev
  • bin/qtest
  • bin/test
  • docs/SETUP.md
  • docs/projects/2510-seo-content-strategy/20-29-strategy/20.05-editorial-calendar-rails-ecosystem-wave-2026.md
  • test/unit/bin_scripts_test.rb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pftg
pftg merged commit fd57bef into master Jul 31, 2026
4 checks passed
@pftg
pftg deleted the claude/devx-r2-phase-a branch July 31, 2026 12:08
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.

2 participants