-
Notifications
You must be signed in to change notification settings - Fork 0
Adds some posts and cleanups #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@pftg has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 53 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds extensive documentation and content pages, introduces CSS utilities and a CTA shortcode, and updates testing infrastructure. Test harness reworked to be port-driven with Hugo middleware and renamed base test class. Adds a unit-test GitHub Action, updates .gitignore, and appends migration/TODO guides and governance docs. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Test Runner
participant ASTC as ApplicationSystemTestCase
participant Capy as Capybara
participant Hugo as Hugo (builder)
participant MW as HugoDirectoryHandler
participant FS as FileSystem
Dev->>ASTC: set TEST_SERVER_PORT / resolve port
ASTC->>Hugo: initialize(path, port)
ASTC->>Hugo: precompile(port) (unless PRECOMPILED_ASSETS)
ASTC->>Capy: Capybara.app = hugo_builder.app
Note over ASTC,Capy: Port-driven server config
Capy->>MW: GET /some/path/
alt path ends with "/" and index.html exists
MW->>FS: read destination/path/index.html
MW-->>Capy: 200 HTML (index.html)
else passthrough
MW-->>Capy: call next app
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive content including blog posts, services, documentation, and infrastructure improvements across multiple areas. The additions focus on Ruby on Rails performance optimization, developer management guidance for non-technical founders, and internal product team ROI measurement.
Key changes include:
- Ruby/Rails performance optimization content with detailed technical guides
- Developer management resources for non-technical founders
- Internal product team ROI frameworks and measurement strategies
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| themes/beaver/layouts/shortcodes/cta.html | Adds CTA shortcode template for call-to-action components |
| themes/beaver/assets/css/utilities.css | Adds CSS utility classes for spacing, typography, display, and colors |
| test/support/hugo_helpers.rb | Refactors Hugo test helpers with improved memory management and port handling |
| test/application_system_test_case.rb | Updates system test configuration with better port management |
| docs/jetthoughts-content-style-guide.md | Comprehensive content writing style guide with voice, tone, and implementation guidelines |
| docs/bem-conversion-strategy.md | BEM CSS conversion strategy documentation with progress tracking |
| docs/70-79-templates-boilerplates/70.08-content-writing-guidelines-reference.md | Updates content writing guidelines removing "thoughtbot-inspired" references |
| docs/30-39-architecture/38-css-component-hierarchy.md | Complete CSS component hierarchy documentation with visual diagrams |
| docs/30-39-architecture/37-css-utility-class-reference.md | Comprehensive CSS utility class reference guide |
| docs/30-39-architecture/36-css-migration-roadmap.md | Detailed CSS migration roadmap with timeline and implementation steps |
| docs/30-39-architecture/35-css-semantic-architecture-guide.md | Complete semantic CSS architecture guide with naming conventions |
| content/services/emergency-cto.md | Emergency CTO services page for non-technical founders |
| content/lead-magnets/developer-performance-scorecard.md | Developer performance assessment scorecard for non-technical founders |
| content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md | Comprehensive Rails testing strategy guide |
| content/blog/ruby-memory-management-best-practices-large-applications.md | Ruby memory management best practices guide |
| content/blog/rails-performance-optimization-15-proven-techniques.md | Rails performance optimization techniques guide |
| content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md | Performance scaling checklist for Rails applications |
| content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md | Comprehensive Rails scaling roadmap from 10K to 1M users |
| content/blog/rails-7-upgrade-guide-step-by-step-migration.md | Step-by-step Rails 7 upgrade guide |
| content/blog/internal-product-teams-cost-center-to-profit-driver.md | Internal product teams ROI measurement and value creation guide |
| content/blog/how-to-manage-developers-when-you-cant-code.md | Developer management guide for non-technical founders |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| elsif Capybara.current_session&.server&.port | ||
| Capybara.current_session.server.port |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential nil reference error: Capybara.current_session may not be available during initialization, causing the safe navigation to fail silently and fall through to the default port.
| elsif Capybara.current_session&.server&.port | |
| Capybara.current_session.server.port | |
| elsif Capybara.server_port | |
| Capybara.server_port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 12
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/support/hugo_helpers.rb (1)
99-105: Path traversal/absolute-path reset in directory handlerFile.join(@public_path, path, ...) resets to absolute when path starts with “/”, bypassing @public_path. This can read outside the public dir.
- if path.end_with?("/") - index_file = File.join(@public_path, path, "index.html") - if File.exist?(index_file) - return serve_file(index_file) - end - end + if path.end_with?("/") + trimmed = path.delete_prefix("/").chomp("/") + candidate = File.expand_path(File.join(@public_path, trimmed, "index.html")) + public_root = File.expand_path(@public_path) + if candidate.start_with?(public_root) && File.file?(candidate) + return serve_file(candidate) + end + end
🧹 Nitpick comments (47)
themes/beaver/assets/css/utilities.css (3)
25-26: Align color tokens with the design system variablesDocs use CSS variables (e.g., var(--color-text), var(--color-text-muted)). Switch from hardcoded hex to variables for themeability.
-.u-text-primary { color: #121212; } -.u-text-muted { color: #757575; } +.u-text-primary { color: var(--color-text); } +.u-text-muted { color: var(--color-text-muted); }
17-19: Hidden utility: consider accessible alternativesdisplay:none is fine, but also provide a screen-reader-only utility to avoid overusing u-hidden where content should remain accessible.
Add (outside this hunk):
.u-sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
22-22: Transition utility: avoid transitioning “all”Limit transitioned properties to improve perf and prevent unintended animations.
-.u-transition { transition: all 0.3s ease-in-out; } +.u-transition { transition: color, background-color, border-color, opacity, box-shadow, transform 0.3s ease-in-out; }themes/beaver/layouts/shortcodes/cta.html (1)
22-24: Normalize button URLs via relURL/absURLPrevents broken links when site baseURL changes and safely handles absolute URLs.
- <a href="{{ $buttonUrl }}" class="cta-block__button btn btn--primary"> + <a href="{{ $buttonUrl | relURL }}" class="cta-block__button btn btn--primary">If you prefer absolute URLs in output, use absURL instead of relURL.
docs/bem-conversion-strategy.md (1)
79-88: Template snippet may not compile as shownThe placeholder
$dynamicCSS586looks accidental. Confirm the example runs or replace with an actual resource reference.docs/jetthoughts-content-style-guide.md (2)
2-2: Avoid using emphasis as a headingChange the emphasized line into plain text or a proper heading to satisfy markdown linters and keep style consistent.
-*Based on proven technical content writing best practices* +Based on proven technical content writing best practices.
67-81: Fix nested code fencesNested
ruby insidemarkdown breaks rendering. Use different fence lengths or indent inner blocks.-```markdown +```markdown ## Database queries running slow? Let's optimize them together. ### Optimizing a slow query -```ruby +~~~~ruby # Your code here -``` +~~~~ ... -``` +```Alternatively, indent the inner Ruby block by 4 spaces.
docs/30-39-architecture/37-css-utility-class-reference.md (2)
9-17: Add language to fenced blockSpecify a language (e.g., text) to satisfy MD040 and improve rendering.
-``` +```text .[prefix]-[property]-[value] .[prefix]-[property]-[modifier]-[value] Examples: .u-m-4 → utility margin 4 units .u-text-lg → utility text large .u-md:block → utility medium-breakpoint block--- `156-181`: **Docs vs implementation mismatch (state/breakpoint syntax and color tokens)** Examples like `.u-hover:bg-primary` and `.u-md:block` are Tailwind-style notations and won’t match literal CSS class names unless generated. Also docs use CSS variables while utilities.css uses hex colors. Add a note clarifying notation vs. literal classes, or align examples with implemented classes (e.g., `u-hover-bg-primary`) and color variables. Also applies to: 496-501, 506-509, 514-516 </blockquote></details> <details> <summary>content/blog/rails-performance-optimization-15-proven-techniques.md (4)</summary><blockquote> `41-47`: **Include rack-timeout gem when configuring Rack::Timeout** The snippet uses Rack::Timeout but Gemfile doesn’t add it. Add the gem or adjust the example to match installed dependencies. ```diff # Gemfile -gem 'newrelic_rpm' # or gem 'skylight' +gem 'newrelic_rpm' # or gem 'skylight' +gem 'rack-timeout'
247-249: Scope cached fragments that can vary per userCaching 'navigation' globally can leak user-specific state. Key by role/locale/user or ensure the partial is truly static.
280-288: Add dependency note for HTTParty or use Net::HTTPExample calls HTTParty without noting the dependency. Either add
gem 'httparty'for completeness or switch to stdlib Net::HTTP in the sample.
298-312: Update Redis session-store recommendation for Rails 7/7.1redis-rails is dated; change the blog snippet (content/blog/rails-performance-optimization-15-proven-techniques.md:298–312) to recommend either redis-session-store (preferred for session-only use) or redis-actionpack (redis-store family) and show the corresponding :redis_session_store / redis-actionpack configuration tied to ENV['REDIS_URL'], ttl/namespace. Verify compatibility with Rails 7/7.1.
test/support/hugo_helpers.rb (2)
6-10: Use HUGO_PUBLIC_DIR and avoid leaking implementation defaultsPer guidelines, don't use HUGO_DEFAULT_PATH. Switch to ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') to centralize config.
Apply:
- def initialize(path: nil, port: nil) - base_path = path || ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test") + def initialize(path: nil, port: nil) + base_path = path || ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test")
62-64: Minor: simplify destination_path@destination is already expanded; returning to_s avoids a second expand.
- def destination_path - File.expand_path(@destination, Dir.pwd) - end + def destination_path + @destination.to_s + endtest/application_system_test_case.rb (4)
20-27: Don’t hardcode port 1314Use ENV.fetch with default per guideline.
-else - 1314 +else + ENV.fetch("TEST_SERVER_PORT", "1314").to_i
29-31: Use HUGO_PUBLIC_DIR instead of HUGO_DEFAULT_PATHAlign with config convention and other helpers.
-hugo_builder = Hugo.new(path: ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test"), port: current_port) +hugo_builder = Hugo.new(path: ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test"), port: current_port)
98-101: Dead fallback branch in extract_section_keysplit('/_').last always returns a String; the || branch never executes. Simplify logic.
- def extract_section_key(name) - # Extract section identifier from screenshot name (e.g., "homepage/_cta" -> "cta") - name.to_s.split('/_').last || name.to_s.split('/').last - end + def extract_section_key(name) + base = name.to_s + base.include?('/_') ? base.split('/_').last : base.split('/').last + end
14-18: Optional: unify port selectionLines 15–18 set Capybara.server_port when TEST_SERVER_PORT is present; the later branch already reads it. This duplication is fine but could be consolidated for clarity.
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md (1)
24-28: Fix MD036: use headings, not bold, for “Expected Results”Switch emphasized labels to proper headings for lint compliance and consistency.
-**Expected Results:** +#### Expected results ... -**Expected Results:** +#### Expected results ... -**Expected Results:** +#### Expected results ... -**Expected Results:** +#### Expected results ... -**Expected Results:** +#### Expected results ... -**Expected Results:** +#### Expected resultsAlso applies to: 51-55, 78-82, 105-109, 132-136, 159-163
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md (1)
54-66: Replace bold pseudo-headings with actual headingsExamples like “What’s working”, “Early warning signs”, “Proactive optimizations” should be H4/H5 headings to satisfy MD036 and improve structure.
-**What's working:** +#### What's working -**Early warning signs:** +#### Early warning signs -**Proactive optimizations:** +#### Proactive optimizationscontent/blog/internal-product-teams-cost-center-to-profit-driver.md (2)
119-142: Headings vs emphasisConvert bold labels (pillar sections) to headings for MD036 compliance and improved navigation.
-**Pillar 1: Operational Efficiency Value** +#### Pillar 1: Operational Efficiency Value ... -**Pillar 2: Revenue Enablement Value** +#### Pillar 2: Revenue Enablement Value ... -**Pillar 3: Risk Mitigation Value** +#### Pillar 3: Risk Mitigation Value ... -**Pillar 4: Innovation Enablement Value** +#### Pillar 4: Innovation Enablement Value
176-197: Use headings for audience subsectionsMake “For the CFO/CEO/COO” headings for scannability and lint.
-**For the CFO:** +#### For the CFO -**For the CEO:** +#### For the CEO -**For the COO:** +#### For the COOdocs/30-39-architecture/36-css-migration-roadmap.md (3)
262-267: Quote globs in PurgeCSS command to prevent shell expansion issues.Bare globs may be expanded by the shell before PurgeCSS runs.
-purgecss --css themes/beaver/assets/css/**/*.css \ - --content themes/beaver/layouts/**/*.html \ - --output unused-css-report.txt +purgecss --css "themes/beaver/assets/css/**/*.css" \ + --content "themes/beaver/layouts/**/*.html" \ + --output "unused-css-report.txt"
269-275: Gate destructive rm with review/dry‑run.Removing files in docs as-is is risky; guard with a review step or use git.
-# Files to remove (after verification) -rm themes/beaver/assets/css/701-layout.css -rm themes/beaver/assets/css/586-dynamic.css -rm themes/beaver/assets/css/fl-*.css +# Files to remove (after verification) +# Review with: git ls-files themes/beaver/assets/css | rg '701-layout\.css|586-dynamic\.css|^themes/beaver/assets/css/fl-.*\.css$' +# Then remove via git to keep history: +# git rm themes/beaver/assets/css/701-layout.css +# git rm themes/beaver/assets/css/586-dynamic.css +# git rm themes/beaver/assets/css/fl-*.css
112-117: Convert emphasis-as-headings to proper headings to satisfy markdownlint (MD036).Replace bold “Testing Checklist” with a heading.
-**Testing Checklist**: +### Testing Checklistcontent/blog/rails-7-upgrade-guide-step-by-step-migration.md (2)
345-357: Rails 7 asset config: avoid redundant settings and note defaults.
config.assets.digestis on by default in recent Rails; keep docs accurate to reduce confusion.-# Use the new digest strategy -config.assets.digest = true +# Digests are enabled by default in Rails 7; no explicit setting required.
49-50: Use proper admonitions instead of emphasis-as-headings (MD036).Convert inline bold “Tip” blocks to headings or Hugo admonitions.
-> **💡 Tip:** Always upgrade on a feature branch... +> [!TIP] +> Always upgrade on a feature branch...Also applies to: 70-80
CLAUDE.md (3)
609-653: Pre-commit hook instruction should prefer repo-managed hooks path.Directly editing
.git/hooks/pre-commitisn’t versioned. Recommend documenting a.githooks/dir andcore.hooksPath.
4495-4499: Minor wording/typo fix in tools list.Extra comma and misspelling.
- - "RivalSearchMCP, brave-search, searchng, (current best practices)" + - "RivalSearchMCP, brave-search, searxng (current best practices)"
4528-4531: Fix typos for professionalism.“exciption”, “cooperatin”, “follwoing”.
-- Do not mask bugs with exciption handlers at all. Only if it requested then add exception handler! -- Use the most conservative way, through cooperatin and follwoing xp practices. +- Do not mask bugs with exception handlers. Only add handlers if explicitly requested. +- Use the most conservative way, through cooperation and following XP practices.docs/30-39-architecture/35-css-semantic-architecture-guide.md (2)
141-149: Replace placeholder selectors with concrete examples; current CSS is invalid.Selectors like
.u-mt-*and.u-sm:*are not valid. Show patterns via comments and concrete class examples.-/* Directional */ -.u-mt-* { margin-top: ...; } -.u-mr-* { margin-right: ...; } -.u-mb-* { margin-bottom: ...; } -.u-ml-* { margin-left: ...; } +/* Directional (pattern) */ +/* Pattern: .u-mt-{1..6} */ +.u-mt-1 { margin-top: var(--space-1); } +.u-mt-2 { margin-top: var(--space-2); } +.u-mt-3 { margin-top: var(--space-3); } +.u-mt-4 { margin-top: var(--space-4); }-/* Breakpoint Prefixes */ -.u-sm:* { /* Small devices */ } -.u-md:* { /* Medium devices */ } +/* Breakpoint helper (documented pattern) */ +/* Use media queries or a utility generator to emit responsive variants. */Also applies to: 199-211
410-475: Token scale consistency with other docs.This guide’s spacing scale (0.25/0.5/1/2/4/8rem) differs from the 8px-based scale in the migration roadmap. Pick one to avoid drift.
BEM_IMPLEMENTATION_GUIDE.md (3)
69-89: Fix markdownlint MD026: remove trailing punctuation in headings.Headings ending with “:” trigger MD026.
-### Before (FL Builder): +### Before (FL Builder)
90-109: Same here: remove trailing colon.-### After (Dual System): +### After (Dual System)
3-24: “100% Complete” claims: add verification note or date.Status assertions can become stale; add date or move to “Planned/Completed on ”.
content/blog/building-scalable-rails-apis-architecture-design-patterns.md (2)
414-421: Redis client: prefer a named, app-wide pool and timeouts.Wrap
Redis.newwith connect/read/write timeouts to avoid request thread stalls.
838-871: Health checkpscalls may be restricted; add fallback.Shelling out to
pscan fail in some PaaS. Provide a rescue with a conservative default.content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md (3)
92-131: Fix RSpec + DatabaseCleaner configuration (conflicting/dated).You enable transactional fixtures and also wire DatabaseCleaner transactions. That's redundant and can cause confusion, especially for JS/system specs. Prefer: transactional_fixtures=true for non-JS, and switch to DatabaseCleaner only where needed (e.g., JS/system). Also, Shoulda Matchers are better configured via Shoulda::Matchers.configure. Replace Timecop with ActiveSupport::Testing::TimeHelpers to avoid an extra dependency.
Apply:
- # Use transactional fixtures for speed - config.use_transactional_fixtures = true - # Include shoulda matchers - config.include(Shoulda::Matchers::ActiveModel, type: :model) - config.include(Shoulda::Matchers::ActiveRecord, type: :model) - # Database cleaner configuration - config.before(:suite) do - DatabaseCleaner.strategy = :transaction - DatabaseCleaner.clean_with(:truncation) - end - config.around(:each) do |example| - DatabaseCleaner.cleaning do - example.run - end - end + # Fast default: transactions for non-JS specs + config.use_transactional_fixtures = true + + # Shoulda Matchers integration + Shoulda::Matchers.configure do |sm| + sm.integrate do |with| + with.test_framework :rspec + with.library :rails + end + end + + # Optional: DatabaseCleaner only for JS/system (Capybara+Selenium) + config.before(:suite) { DatabaseCleaner.clean_with(:truncation) } + config.before(:each, type: :system) { DatabaseCleaner.strategy = :truncation } + config.before(:each, js: true) { DatabaseCleaner.strategy = :truncation } + config.before(:each) { DatabaseCleaner.start } + config.after(:each) { DatabaseCleaner.clean }And in specs, prefer:
- gem 'timecop' + # Use built-in Rails helpersAnd include:
RSpec.configure do |config| config.include ActiveSupport::Testing::TimeHelpers end
695-701: JWT helper: avoid coupling to production secret; set algorithm explicitly.Use a test-only secret and explicit HS256 to reduce brittleness across environments.
- JWT.encode(payload, Rails.application.secret_key_base) + secret = Rails.application.credentials.dig(:jwt, :test_secret) || 'test-secret' + JWT.encode(payload, secret, 'HS256')
122-156: markdownlint warnings: trailing punctuation/HR style.The linter flagged MD026/MD035 in this doc. Remove colons from headings (e.g., “### RSpec configuration”) and ensure horizontal rules use
---.Please run markdownlint and fix the flagged lines; I can auto-generate a patch if you prefer.
content/blog/ruby-memory-management-best-practices-large-applications.md (2)
460-469: Duplicate heading text (“Real-time memory monitoring”).MD024 flagged duplicate headings; rename one to avoid lint failures.
Example: “Real-time memory monitoring (service)” vs “Real-time memory monitoring (middleware)”.
816-843: StatsD usage may not match client API.Some Ruby clients expect
increment('metric', by: 1)or options hash. Verify the exact client and adjust examples accordingly to prevent copy/paste errors by readers.docs/70-79-templates-boilerplates/70.08-content-writing-guidelines-reference.md (1)
283-289: Replace placeholder date with dynamic Hugo field.Avoid “[Current Date]”. Use front matter
lastmodor Hugo’s.Lastmod.-**Last Updated**: [Current Date] +**Last Updated**: {{< lastmod >}}Alternatively, add
lastmod:in front matter and render it.content/services/emergency-cto.md (1)
20-21: Substantiate numeric claims or soften.“40% of startups” needs a citation, and “50+ companies” should be backed by data or revised to qualitative phrasing.
-This scenario happens to 40% of startups +This scenario is common among startups-…has helped 50+ companies… +…has helped many companies…content/blog/how-to-manage-developers-when-you-cant-code.md (1)
20-23: Quantified claims: verify or generalize.“We’ve seen this 200+ times” should be sourced or rephrased to avoid appearing inflated.
-We've seen this exact situation 200+ times +We’ve seen this situation repeatedly with clientscontent/lead-magnets/developer-performance-scorecard.md (1)
151-182: markdownlint: headings punctuation and emphasis-as-heading.
- Remove colons from headings (MD026).
- Replace italicized subtitle with a proper heading or paragraph (MD036).
-**Total Points: ____/100** +Total Points: ____/100 +{: .score-total}-### Score Interpretation: +### Score Interpretation
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (26)
.gitignore(1 hunks)BEM_IMPLEMENTATION_GUIDE.md(1 hunks)CLAUDE.md(3 hunks)TODO.md(1 hunks)content/blog/building-scalable-rails-apis-architecture-design-patterns.md(1 hunks)content/blog/how-to-manage-developers-when-you-cant-code.md(1 hunks)content/blog/internal-product-teams-cost-center-to-profit-driver.md(1 hunks)content/blog/rails-7-upgrade-guide-step-by-step-migration.md(1 hunks)content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md(1 hunks)content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md(1 hunks)content/blog/rails-performance-optimization-15-proven-techniques.md(1 hunks)content/blog/ruby-memory-management-best-practices-large-applications.md(1 hunks)content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md(1 hunks)content/lead-magnets/developer-performance-scorecard.md(1 hunks)content/services/emergency-cto.md(1 hunks)docs/30-39-architecture/35-css-semantic-architecture-guide.md(1 hunks)docs/30-39-architecture/36-css-migration-roadmap.md(1 hunks)docs/30-39-architecture/37-css-utility-class-reference.md(1 hunks)docs/30-39-architecture/38-css-component-hierarchy.md(1 hunks)docs/70-79-templates-boilerplates/70.08-content-writing-guidelines-reference.md(3 hunks)docs/bem-conversion-strategy.md(1 hunks)docs/jetthoughts-content-style-guide.md(1 hunks)test/application_system_test_case.rb(2 hunks)test/support/hugo_helpers.rb(3 hunks)themes/beaver/assets/css/utilities.css(1 hunks)themes/beaver/layouts/shortcodes/cta.html(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
test/**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
Ruby test files must follow the *_test.rb naming convention and live under test/
Files:
test/support/hugo_helpers.rbtest/application_system_test_case.rb
**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rb: Do not hardcode port 1314; use ENV.fetch("TEST_SERVER_PORT", "1314") instead
Do not hardcode the public path; use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') instead of literal paths like "_dest/public-test"
Files:
test/support/hugo_helpers.rbtest/application_system_test_case.rb
🧠 Learnings (3)
📚 Learning: 2024-11-08T06:10:55.003Z
Learnt from: AucT
PR: jetthoughts/jetthoughts.github.io#200
File: themes/beaver/assets/css/use-cases-dynamic.css:86-102
Timestamp: 2024-11-08T06:10:55.003Z
Learning: In `themes/beaver/assets/css/use-cases-dynamic.css`, the user prefers to use absolute units (e.g., `px`) over relative units (e.g., `rem`), and considers it acceptable to omit semicolons at the end of CSS declarations.
Applied to files:
themes/beaver/assets/css/utilities.css
📚 Learning: 2025-09-16T20:48:45.991Z
Learnt from: CR
PR: jetthoughts/jetthoughts.github.io#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T20:48:45.991Z
Learning: Applies to **/*.rb : Do not hardcode the public path; use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') instead of literal paths like "_dest/public-test"
Applied to files:
test/support/hugo_helpers.rbtest/application_system_test_case.rb
📚 Learning: 2025-09-16T20:48:45.991Z
Learnt from: CR
PR: jetthoughts/jetthoughts.github.io#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T20:48:45.991Z
Learning: Applies to **/*.rb : Do not hardcode port 1314; use ENV.fetch("TEST_SERVER_PORT", "1314") instead
Applied to files:
test/application_system_test_case.rb
🧬 Code graph analysis (2)
test/support/hugo_helpers.rb (1)
test/unit/base_page_test.rb (1)
private(9-91)
test/application_system_test_case.rb (1)
test/support/hugo_helpers.rb (2)
app(39-60)precompile(23-37)
🪛 markdownlint-cli2 (0.17.2)
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md
2-2: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
docs/30-39-architecture/35-css-semantic-architecture-guide.md
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
269-269: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/lead-magnets/developer-performance-scorecard.md
13-13: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
151-151: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
153-153: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
172-172: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
173-173: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
174-174: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
175-175: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
177-177: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
178-178: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
179-179: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
180-180: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
182-182: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
BEM_IMPLEMENTATION_GUIDE.md
69-69: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
90-90: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
content/blog/internal-product-teams-cost-center-to-profit-driver.md
119-119: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
125-125: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
131-131: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
137-137: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
235-235: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
241-241: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
246-246: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
265-265: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
270-270: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
282-282: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
289-289: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
294-294: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/blog/rails-7-upgrade-guide-step-by-step-migration.md
51-51: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
55-55: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
66-66: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
70-70: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
82-82: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
86-86: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
96-96: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
100-100: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
119-119: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
137-137: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
149-149: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
163-163: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
182-182: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
184-184: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
194-194: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
196-196: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
211-211: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
230-230: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
247-247: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
257-257: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
278-278: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
305-305: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
332-332: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
345-345: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
363-363: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
385-385: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
389-389: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
393-393: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/services/emergency-cto.md
14-14: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md
138-138: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
157-157: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
183-183: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
295-295: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
315-315: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
422-422: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
438-438: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
452-452: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
476-476: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
492-492: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
526-526: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
551-551: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
588-588: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
619-619: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
638-638: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
682-682: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
758-758: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
785-785: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
819-819: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
842-842: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
874-874: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
912-912: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
982-982: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
988-988: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
990-990: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
996-996: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
998-998: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
1004-1004: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
1006-1006: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
docs/30-39-architecture/36-css-migration-roadmap.md
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
269-269: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
docs/30-39-architecture/37-css-utility-class-reference.md
9-9: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/jetthoughts-content-style-guide.md
2-2: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
81-81: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
content/blog/ruby-memory-management-best-practices-large-applications.md
460-460: Multiple headings with the same content
(MD024, no-duplicate-heading)
content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md
13-13: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
151-151: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
153-153: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
172-172: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
173-173: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
174-174: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
175-175: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
177-177: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
178-178: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
179-179: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
180-180: Horizontal rule style
Expected: ---; Actual: ________________________________
(MD035, hr-style)
182-182: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build_and_deploy / build
🔇 Additional comments (13)
.gitignore (1)
82-82: LGTM, but confirm directory usage overlaps with tmp/Now both tmp/ and _tmp/ are ignored. Verify the code/tests don’t alternate between them, or consolidate to one to avoid confusion.
test/application_system_test_case.rb (2)
62-72: Section configs update looks goodHash formatting changes are harmless and frozen constants preserved.
32-34: Precompile gating is correctHonors PRECOMPILED_ASSETS and passes resolved port. LGTM.
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md (2)
7-7: Verify Hugo front matter date keyHugo typically uses date:, not created_at:. Ensure your templates read created_at; otherwise replace with date or include both.
-created_at: "2025-01-16T10:00:00Z" +date: "2025-01-16T10:00:00Z"If your theme expects created_at, keep both keys with the same value.
972-1017: Case-study section structure is strongGood narrative with measurable outcomes and timeline. No changes needed.
content/blog/internal-product-teams-cost-center-to-profit-driver.md (1)
388-393: CTA shortcode usage looks correctMatches existing site pattern; link path readable. LGTM.
docs/30-39-architecture/36-css-migration-roadmap.md (1)
9-39: Verify Mermaid rendering in Hugo.Ensure Mermaid is enabled (shortcode/markup render hook). Otherwise the timeline won’t render.
docs/30-39-architecture/38-css-component-hierarchy.md (2)
9-40: Mermaid/ASCII diagrams: ensure Hugo renders them.Confirm Mermaid is enabled or wrap with site’s shortcode. Otherwise they’ll render as code blocks.
Also applies to: 171-190
329-363: Confirm import paths map to real source partials or compiled bundlesthemes/beaver/assets/css/ exists and contains compiled CSS (e.g., style.css, utilities.css, component-bundle.css, theme-main.css), but no SASS partials or component index files were found (no _index.* or index.* under components/*). Ensure the @import lines in docs/30-39-architecture/38-css-component-hierarchy.md (lines 329–363) point to actual source partials (e.g. settings/_variables.scss, components/layout/index.scss) or update them to reference the compiled bundles (component-bundle.css / theme-main.css).
docs/70-79-templates-boilerplates/70.08-content-writing-guidelines-reference.md (1)
33-41: Broken/unknown internal link risk.Verify
/blog/we-got-3-main-principles-for-writing-technical-blog-posts-heres-what-learned/exists; otherwise replace with a working path.content/services/emergency-cto.md (1)
59-64: Shortcode prop names match template — no action required.
themes/beaver/layouts/shortcodes/cta.html uses .Get "title", "description", "button-text", and "button-url"; content/services/emergency-cto.md uses those exact keys.content/blog/how-to-manage-developers-when-you-cant-code.md (2)
28-40: Mermaid rendering support — confirmed; no action required.Beaver theme loads Mermaid and initializes it (themes/beaver/layouts/baseof.html) and provides a render hook that wraps code blocks in
and sets the page Store flag (themes/beaver/layouts/_markup/render-codeblock-mermaid.html).
238-244: Lead magnet page exists but referenced PDF is missing — add asset or update pathcontent/lead-magnets/developer-performance-scorecard.md frontmatter: download_file: "/downloads/developer-performance-scorecard.pdf"; blog CTA at content/blog/how-to-manage-developers-when-you-cant-code.md → /lead-magnets/developer-performance-scorecard. Repository does not contain developer-performance-scorecard.pdf — add the PDF to static/downloads/developer-performance-scorecard.pdf (or update download_file to an existing asset) and verify the route/download works.
content/blog/building-scalable-rails-apis-architecture-design-patterns.md
Show resolved
Hide resolved
| def create | ||
| @post = current_user.posts.build(post_params) | ||
| authorize @post | ||
| if @post.save | ||
| render_success(PostSerializer.new(@post), 'Post created successfully', :created) | ||
| else | ||
| render_error('Failed to create post', @post.errors) | ||
| end | ||
| end | ||
| def update | ||
| authorize @post | ||
| if @post.update(post_params) | ||
| render_success(PostSerializer.new(@post), 'Post updated successfully') | ||
| else | ||
| render_error('Failed to update post', @post.errors) | ||
| end | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent serializer usage in render_success: call .to_hash/.serialize consistently.
You pass the serializer instance, not its output, which will render incorrectly.
- render_success(PostSerializer.new(@post), 'Post created successfully', :created)
+ render_success(PostSerializer.new(@post).to_hash, 'Post created successfully', :created)Do the same for the update path.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In content/blog/building-scalable-rails-apis-architecture-design-patterns.md
around lines 239 to 258, the create and update actions pass a serializer
instance (PostSerializer.new(@post)) into render_success, which will render
incorrectly; change both calls to pass the serializer output consistently (e.g.,
PostSerializer.new(@post).serializable_hash or .to_hash) so render_success
receives a plain hash, keeping the :created status on create.
content/blog/building-scalable-rails-apis-architecture-design-patterns.md
Show resolved
Hide resolved
content/blog/building-scalable-rails-apis-architecture-design-patterns.md
Show resolved
Hide resolved
| # Check object generation | ||
| ObjectSpace.each_object(String) do |str| | ||
| puts "String: #{str[0..20]}... Generation: #{GC.generation(str)}" | ||
| end | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect API: GC.generation(object) doesn’t exist.
Ruby exposes allocation generation via ObjectSpace when allocation tracing is enabled. Replace with ObjectSpace APIs.
-ObjectSpace.each_object(String) do |str|
- puts "String: #{str[0..20]}... Generation: #{GC.generation(str)}"
-end
+require 'objspace'
+ObjectSpace.trace_object_allocations_start
+ObjectSpace.each_object(String) do |str|
+ gen = ObjectSpace.allocation_generation(str) rescue nil
+ puts "String: #{str[0..20]}... Generation: #{gen}"
+end📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Check object generation | |
| ObjectSpace.each_object(String) do |str| | |
| puts "String: #{str[0..20]}... Generation: #{GC.generation(str)}" | |
| end | |
| ``` | |
| # Check object generation | |
| require 'objspace' | |
| ObjectSpace.trace_object_allocations_start | |
| ObjectSpace.each_object(String) do |str| | |
| gen = ObjectSpace.allocation_generation(str) rescue nil | |
| puts "String: #{str[0..20]}... Generation: #{gen}" | |
| end |
🤖 Prompt for AI Agents
In content/blog/ruby-memory-management-best-practices-large-applications.md
around lines 118-123, the snippet incorrectly calls GC.generation(str) which
doesn't exist; replace that call with the ObjectSpace API that returns
allocation generation (e.g., ObjectSpace.allocation_generation(str)) and ensure
allocation tracing is enabled before iterating (call
ObjectSpace.trace_object_allocations_start if not already enabled); update the
log message accordingly to use the ObjectSpace allocation generation call.
| type: "service" | ||
| layout: "service-page" | ||
| draft: false | ||
| service_type: "emergency-cto" | ||
| target_audience: ["non-technical-founders", "startups", "pe-vc-firms"] | ||
| price_range: "$15,000-50,000/month" | ||
| engagement_length: "1-6 months" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Template existence and taxonomy.
Ensure layout: "service-page" and type: "service" are supported by the theme (single/list templates, menus). Otherwise the page may 404 or render with default layout.
🏁 Script executed:
#!/bin/bash
fd 'service-page.*\.(html|tmpl)$' themes -t f
rg -n "type.*service" content/**/_index.md config*Length of output: 0
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"
echo "--- Top-level entries ---"
ls -la | sed -n '1,200p' || true
echo "--- Check for themes and layouts directories ---"
for d in themes layouts; do
if [ -d "$d" ]; then
echo "Directory: $d"
ls -la "$d" | sed -n '1,200p' || true
else
echo "No directory: $d"
fi
done
echo "--- Find files with 'service-page' in name ---"
if command -v fd >/dev/null 2>&1; then
fd -HI -e html -e tmpl -e htm -E node_modules 'service-page' || true
else
find . -type f \( -iname '*service-page*.html' -o -iname '*service-page*.tmpl' -o -iname '*service-page*.htm' \) -print || true
fi
echo "--- Search for 'service-page' and related frontmatter across repo ---"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden -S "service-page" themes layouts || true
rg -n --hidden -S '\blayout:\s*["'\'']?service-page["'\'']?' || true
rg -n --hidden -S '\btype:\s*["'\'']?service["'\'']?' content || true
else
grep -RIn --exclude-dir=node_modules "service-page" themes layouts || true
grep -RIn --exclude-dir=node_modules -E "layout:\s*['\"]?service-page['\"]?" || true
grep -RIn --exclude-dir=node_modules -E "type:\s*['\"]?service['\"]?" content || true
fi
echo "--- Show content/services/emergency-cto.md if present ---"
if [ -f content/services/emergency-cto.md ]; then
sed -n '1,200p' content/services/emergency-cto.md || true
else
echo "content/services/emergency-cto.md not found"
fi
echo "--- Search for any template files with 'service' in name under themes/layouts ---"
if command -v fd >/dev/null 2>&1; then
fd -HI -e html -e tmpl -e htm -E node_modules 'service' themes layouts || true
else
find themes layouts -type f -iname '*service*' -print || true
fiLength of output: 7040
Template existence and taxonomy — add missing layout or update front matter
-
No template named "service-page" found under themes/beaver/layouts; existing candidate templates: themes/beaver/layouts/page/services.html and related partials. Add themes/beaver/layouts/service-page.html (or equivalent) or change content/services/emergency-cto.md to use an existing theme layout so the page renders correctly.
-
Inconsistent front-matter type: content/services/emergency-cto.md uses type: "service" while content/services/fractional-cto-cost/index.md uses type: "Service". Standardize the type value the theme expects so single/list templates and menus behave consistently.
Locations: content/services/emergency-cto.md; themes/beaver/layouts/page/services.html; content/services/fractional-cto-cost/index.md:11
cdba538 to
62d389a
Compare
62d389a to
d1cfa82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 20
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
test/support/hugo_helpers.rb (1)
98-104: Path handling bug and potential traversal — File.join with absolute path drops the root.
request.path_info starts with “/”; File.join(@public_path, path, "index.html") ignores @public_path. Also sanitize “..”.- if path.end_with?("/") - index_file = File.join(@public_path, path, "index.html") - if File.exist?(index_file) - return serve_file(index_file) - end - end + if path.end_with?("/") + # Normalize and ensure resolution stays under @public_path + rel = path.sub(%r{\A/+}, "") # drop leading slashes + candidate_dir = File.expand_path(rel, @public_path) + public_root = File.expand_path(@public_path) + return @app.call(env) unless candidate_dir.start_with?(public_root) + index_file = File.join(candidate_dir, "index.html") + return serve_file(index_file) if File.file?(index_file) + endtest/unit/meta_tags/seo_schema_test.rb (2)
1-1: Require path mismatch with new base classFile requires
../base_page_testbut inheritsBasePageTestCase. Update require to the new file to avoid load errors.-require_relative "../base_page_test" +require_relative "../base_page_test_case"
31-34: Do not use skip() to mask tests; fail on empty schemaGuidelines forbid
skip. Treat empty schema as a failure.- if json_content.empty? - skip "Schema #{index} on #{file_path} is empty - might indicate template issue" - end + assert !json_content.empty?, "Schema #{index} on #{file_path} is empty - indicates template issue"test/unit/base_page_test_case.rb (1)
9-15: Use the mandated env var for public path (HUGO_PUBLIC_DIR), keep backward compat.Guideline: use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test'). Current code uses HUGO_DEFAULT_PATH, which violates the rule and may confuse CI config.
class BasePageTestCase < Minitest::Test private def root_path - ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test") + # Prefer the standardized var, fall back for compatibility + ENV["HUGO_PUBLIC_DIR"] || ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test") end
♻️ Duplicate comments (5)
content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md (1)
1226-1324: CI: Chrome install likely fails; coverage upload misconfigured.Same issue noted previously: installing google-chrome-stable via apt without adding Google’s repo typically fails on ubuntu-latest, and SimpleCov doesn’t emit coverage.xml by default—Codecov v3 step won’t find it.
- - name: Install dependencies - run: | - npm install - sudo apt-get update - sudo apt-get install -y google-chrome-stable + - name: Install dependencies + run: npm install + + - name: Setup Chrome + uses: browser-actions/setup-chrome@v1 @@ - - name: Upload coverage reports - uses: codecov/codecov-action@v3 - with: - file: ./coverage/coverage.xml - fail_ci_if_error: true + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: trueAnd generate Cobertura XML (see next comment) or keep Codecov’s default uploader behavior without relying on coverage.xml.
content/blog/ruby-memory-management-best-practices-large-applications.md (1)
118-125: Incorrect API: GC.generation doesn’t exist; use ObjectSpace allocation generation.Replace with ObjectSpace APIs and enable allocation tracing. Also fix the tip text.
-# Check object generation -ObjectSpace.each_object(String) do |str| - puts "String: #{str[0..20]}... Generation: #{GC.generation(str)}" -end +# Check object allocation generation +require 'objspace' +ObjectSpace.trace_object_allocations_start +ObjectSpace.each_object(String) do |str| + gen = ObjectSpace.allocation_generation(str) rescue nil + puts "String: #{str[0..20]}... Allocation generation: #{gen}" +end-> **💡 Tip:** Use `GC.generation(object)` to see which generation an object belongs to. Generation 0 objects are newest and collected most frequently. +> Tip: To inspect allocation generation, enable tracing and use `ObjectSpace.allocation_generation(obj)`.docs/30-39-architecture/36-css-migration-roadmap.md (1)
159-164: Remove Tailwind-only @apply from plain CSS example or gate with build tooling.
Keep dual-class markup instead, or convert to SCSS/PostCSS with Tailwind enabled.-/* Temporary compatibility layer */ -.fl-page { @apply .l-page; } -.fl-page-header { @apply .l-header; } -.fl-page-content { @apply .l-main; } -.fl-page-footer { @apply .l-footer; } +/* Use dual-class markup temporarily; no @apply in plain CSS */ +/* e.g., <div class="fl-page l-page"> ... */docs/30-39-architecture/35-css-semantic-architecture-guide.md (1)
352-364: SCSS-only constructs in CSS example (@extend, !development).
Either convert to .scss with build support or show plain-CSS alternatives.-/* _compatibility.css - Temporary during migration */ +/* _compatibility.scss - Temporary during migration (requires Sass) */ ... -.fl-row { @extend .l-row; } +// .fl-row { @extend .l-row; } ... -.fl-row::before { - content: "Deprecated: Use .l-row instead" !development; -} +/* Use build-time warnings or dev-only JS logging for deprecations. */content/lead-magnets/developer-performance-scorecard.md (1)
1-10: Broken download risk: missing /downloads/developer-performance-scorecard.pdf.
Previous run found no PDF in static/downloads. Commit the file or update download_file.#!/bin/bash set -euo pipefail echo "Expect: static/downloads/developer-performance-scorecard.pdf" fd -t f -HI 'developer-performance-scorecard.pdf' | rg -n '^static/downloads/' || { echo "PDF not found under static/downloads/"; exit 1; }
🧹 Nitpick comments (45)
content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md (12)
36-36: Add language to fenced block (markdownlint MD040).Specify a language for the testing pyramid diagram to satisfy linting and improve rendering.
-``` +```text
166-312: Missing code fencing around Ruby examples (multiple MD023/MD046 hits).The model and factories snippet isn’t fenced; headings are being parsed as text and code as plain paragraphs. Add an opening Ruby fence before the snippet (the closing fence at Line 312 is present).
### Comprehensive model testing -# spec/models/user_spec.rb +```ruby +# spec/models/user_spec.rb ... - end -end -# spec/factories/users.rb + end +end +# spec/factories/users.rb ... end -``` +```
101-123: Avoid mixing transactional fixtures with DatabaseCleaner.You’ve enabled both transactional fixtures and DatabaseCleaner (:transaction). This is redundant and can cause flaky visibility issues for JS/system tests.
- Rely on transactional fixtures by default and remove DatabaseCleaner hooks:
RSpec.configure do |config| # Use transactional fixtures for speed config.use_transactional_fixtures = true @@ - # Database cleaner configuration - config.before(:suite) do - DatabaseCleaner.strategy = :transaction - DatabaseCleaner.clean_with(:truncation) - end - - config.around(:each) do |example| - DatabaseCleaner.cleaning do - example.run - end - end + # If you need non-transactional strategy for JS/system specs, tag them and switch strategy in spec/support. end
- For JS/system specs only, configure truncation/deletion in spec/support (outside this snippet).
108-111: Use Shoulda Matchers’ recommended integration block.Directly including matcher modules is discouraged; use the official integration to wire Rails + RSpec.
- # Include shoulda matchers - config.include(Shoulda::Matchers::ActiveModel, type: :model) - config.include(Shoulda::Matchers::ActiveRecord, type: :model) +end + +# Shoulda Matchers +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end end
132-155: Produce Cobertura XML if you keep coverage.xml in CI.SimpleCov doesn’t emit coverage.xml by default. Add the Cobertura formatter and keep HTML.
-# spec/spec_helper.rb -require 'simplecov' -SimpleCov.start 'rails' do +# spec/spec_helper.rb +require 'simplecov' +require 'simplecov-cobertura' +SimpleCov.formatters = [ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::CoberturaFormatter +] +SimpleCov.start 'rails' doAlso add the gem in the earlier Gemfile snippet:
group :test do gem 'capybara' gem 'selenium-webdriver' gem 'webmock' # Mock external HTTP requests gem 'vcr' # Record HTTP interactions - gem 'simplecov', require: false # Code coverage + gem 'simplecov', require: false # Code coverage + gem 'simplecov-cobertura', require: false end
1103-1164: TDD example: wrap spec in a fenced Ruby block (fix MD046/MD023).Lines starting with “# RED…” and the spec are parsed as headings/plain text, not code.
-# RED - Write a failing test -# spec/models/post_spec.rb -RSpec.describe Post do +```ruby +# RED - Write a failing test +# spec/models/post_spec.rb +RSpec.describe Post do describe '#reading_time' do it 'calculates reading time based on word count' do post = build(:post, content: 'word ' * 200) # 200 words expect(post.reading_time).to eq(1) # 1 minute end end end +```
1166-1185: TDD example: wrap controller implementation in Ruby code fences.This snippet should be fenced to avoid malformed headings and lints.
-class PostsController < ApplicationController +```ruby +class PostsController < ApplicationController before_action :authenticate_user!, only: [:create] def create @post = current_user.posts.build(post_params) if @post.save redirect_to @post, notice: 'Post was successfully created.' else render :new end end private def post_params params.require(:post).permit(:title, :content) end end +```
1186-1213: TDD example: fence the refactor version too.Same fencing issue for the refactor block.
-class PostsController < ApplicationController +```ruby +class PostsController < ApplicationController before_action :authenticate_user!, only: [:create] rescue_from ActiveRecord::RecordInvalid, with: :handle_invalid_record @@ def handle_invalid_record(exception) @post = exception.record flash.now[:alert] = 'Unable to save post. Please try again.' render :new, status: :unprocessable_entity end end +```
1122-1125: Controller spec usesassigns(removed in Rails 5+ unless you add rails-controller-testing).Either add the gem or avoid
assignsby asserting on persisted records/response.Option A (avoid assigns):
- it 'assigns the post to the current user' do - post :create, params: valid_params - expect(assigns(:post).author).to eq(user) - end + it 'assigns the post to the current user' do + post :create, params: valid_params + expect(Post.last.author).to eq(user) + endOption B: mention adding rails-controller-testing in the Gemfile for docs completeness.
1394-1397:perform_undermatcher requires rspec-benchmark.You reference
perform_underlater but haven’t included the gem in the performance Gemfile snippet.group :test do gem 'benchmark-ips' gem 'memory_profiler' + gem 'rspec-benchmark' end
1400-1406: Include rspec-benchmark matchers in the performance spec.Without this include,
perform_underwon’t be recognized.-RSpec.describe 'Model Performance' do +RSpec.describe 'Model Performance' do + include RSpec::Benchmark::Matchers
1348-1352: Avoid DB writes inbefore(:all); uselet/let!or test fixtures.Creating records in
before(:all)can leak state between examples and across files, especially with parallel tests.
- Replace with
let_it_be(test-prof) orlet!within the example group.- If truly global, seed within
before(:suite)and reset appropriately.content/blog/ruby-memory-management-best-practices-large-applications.md (6)
456-461: Duplicate heading: “Real-time memory monitoring.”Remove the second H3 to satisfy MD024 and avoid TOC noise.
### Real-time memory monitoring - -### Real-time memory monitoring
493-509: Heavy ObjectSpace scan on alert paths.Iterating every object is expensive and can exacerbate memory/CPU pressure. Prefer cheaper counts or sampling.
- # Log top object classes - object_counts = Hash.new(0) - ObjectSpace.each_object do |obj| - object_counts[obj.class] += 1 - end - Rails.logger.info "Top object classes:" - object_counts.sort_by(&:last).last(10).reverse.each do |klass, count| - Rails.logger.info " #{klass}: #{count}" - end + # Cheaper alternative: aggregate by type without full enumeration + Rails.logger.info "Object counts (by type): #{ObjectSpace.count_objects}" + # Optional: sample a subset to estimate top classes during incidents + # sample = []; ObjectSpace.each_object { |o| sample << o.class if rand < 0.0001 } + # Rails.logger.info "Sampled top classes: #{sample.tally.sort_by(&:last).last(10)}"
529-559: Avoid shelling out per request to read RSS.Spawning
pson every request is costly. Either sample (e.g., 1–5%), cache the value briefly, or use a cheaper Linux path.- memory_before = memory_usage_mb + memory_before = memory_usage_mb if rand < 0.05 # sample ~5% @@ - memory_after = memory_usage_mb - memory_diff = memory_after - memory_before - if memory_diff > 10 # Log requests that use >10MB + memory_after = memory_usage_mb if memory_before + memory_diff = memory_after && memory_before ? (memory_after - memory_before) : 0 + if memory_before && memory_diff > 10 # Log requests that use >10MB @@ - def memory_usage_mb - `ps -o rss= -p #{Process.pid}`.to_i / 1024.0 - end + def memory_usage_mb + # Linux: /proc/self/statm returns pages; convert to MB + if File.readable?('/proc/self/statm') + pages = File.read('/proc/self/statm').split.first.to_i + (pages * (Etc.sysconf(Etc::SC_PAGESIZE) rescue 4096)) / 1024.0 / 1024.0 + else + `ps -o rss= -p #{Process.pid}`.to_i / 1024.0 + end + end
803-821: Use appropriate StatsD types (gauges/counters/distributions).Durations and heap sizes shouldn’t be reported via increment.
- if defined?(StatsD) - metrics.each do |key, value| - StatsD.increment("gc.#{key}", value) - end - end + if defined?(StatsD) + StatsD.distribution('gc.duration_seconds', metrics[:duration_seconds]) + StatsD.increment('gc.runs', metrics[:gc_runs]) + StatsD.increment('gc.major_runs', metrics[:major_gc_runs]) + StatsD.increment('gc.minor_runs', metrics[:minor_gc_runs]) + StatsD.count('gc.objects_allocated', metrics[:objects_allocated]) if StatsD.respond_to?(:count) + StatsD.gauge('gc.heap_pages', metrics[:heap_pages]) + StatsD.gauge('gc.heap_slots_used', metrics[:heap_slots_used]) + StatsD.gauge('gc.heap_slots_free', metrics[:heap_slots_free]) + end
1017-1049: Thread safety for in-process caches.The LRU-esque cache isn’t synchronized; concurrent access may corrupt @access_order/@cache.
Consider guarding mutations with a Mutex:
class SizeLimitedCache def initialize(max_size: 1000) @cache = {} @access_order = [] @max_size = max_size + @lock = Mutex.new end @@ - def get(key, &block) - if @cache.key?(key) - # Update access order - @access_order.delete(key) - @access_order << key - @cache[key] - else - value = block.call - set(key, value) - value - end - end + def get(key, &block) + @lock.synchronize do + return touch_and_get(key) if @cache.key?(key) + value = block.call + set(key, value) + value + end + end @@ - def set(key, value) + def set(key, value) + @lock.synchronize do @cache[key] = value @access_order << key if @cache.size > @max_size oldest_key = @access_order.shift @cache.delete(oldest_key) end - end + end + end + + def touch_and_get(key) + @access_order.delete(key) + @access_order << key + @cache[key] + end
1176-1187: Retry inside thread rescue is brittle — wrap loop with begin/rescue.Avoid
retryhere; restart the check loop after a backoff.- def self.start - Thread.new do - loop do - check_memory_and_alert - sleep CHECK_INTERVAL - end - rescue => e - Rails.logger.error "Memory monitor error: #{e.message}" - sleep 60 # Wait before restarting - retry - end - end + def self.start + Thread.new do + loop do + begin + check_memory_and_alert + sleep CHECK_INTERVAL + rescue => e + Rails.logger.error "Memory monitor error: #{e.message}" + sleep 60 + end + end + end + endcontent/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md (5)
7-13: Use Hugo-standard front matter keys (date,lastmod) and verify SEO fields.
- Replace
created_atwithdate(Hugo’s default) and optionally addlastmod. Many themes ignorecreated_at.- Verify that
metatagsandkeywordsare actually consumed by your theme/SEO partials; otherwise preferimages/imageandtags.Example front matter tweak:
- created_at: "2025-01-16T10:00:00Z" + date: "2025-01-16T10:00:00Z" + lastmod: "2025-09-17T00:00:00Z"
8-11: Ensure cover image exists, is optimized, and wired for social previews.
- Confirm
rails-scaling-roadmap.jpgis present in this folder and sized for retina (e.g., 1600–2000px width), with compressed WebP/AVIF variants.- Consider adding
images: ["/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-roadmap.jpg"](or your theme’s field) for OG/Twitter cards to avoid relying on custommetatags.Also applies to: 15-15
264-275: Outdated Redis gems; align with Rails’ built‑in Redis cache store.Recommending
redis-rails/hiredisis obsolete. Rails 6+/7+ ships:redis_cache_store; use theredisgem (which uses redis-client).- # Gemfile - gem 'redis-rails' - gem 'hiredis' # Faster Redis protocol + # Gemfile + gem 'redis', '>= 5.0' # Works with Rails :redis_cache_storeYour
config.cache_store = :redis_cache_store, { ... }block can stay as-is.
808-813: Undefinedforward_headershelper in API gateway example.
.headers(forward_headers)references an undefined method. Provide a minimal helper or inline selective headers to avoid forwarding hop-by-hop headers.- .headers(forward_headers) + .headers({ + "Accept" => request.headers["Accept"], + "Authorization" => request.headers["Authorization"], + "X-Request-Id" => request.request_id + })Or define:
def forward_headers request.headers.slice("Accept", "Authorization", "X-Request-Id") end
126-131: Fix markdownlint MD036: use headings instead of bold “Expected metrics.”Replace bolded “Expected metrics …” lines with proper headings to satisfy MD036 and improve structure.
Example:
- **Expected metrics at this stage:** + ### Expected metrics at this stageRepeat in the other sections noted above.
Also applies to: 249-254, 410-415, 576-581, 746-751, 965-971, 1028-1037
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md (1)
2-2: Resolve MD036: avoid emphasis as a heading.Make the subtitle a heading or blockquote.
-*From 10K to 1M users - Your step-by-step optimization roadmap* +### From 10K to 1M users — your step-by-step optimization roadmap.github/workflows/test-unit.yml (1)
3-9: Add minimal permissions and concurrency to harden CI and avoid duplicate runs.
- Recommend top-level permissions and PR-concurrency.
name: unit-tests on: pull_request: +permissions: + contents: read + +concurrency: + group: unit-tests-${{ github.ref }} + cancel-in-progress: truedocs/jetthoughts-content-style-guide.md (2)
2-2: Fix MD036: avoid emphasis-as-heading on line 2.
Use plain text or a proper heading.-*Based on proven technical content writing best practices* +Based on proven technical content writing best practices
67-82: Nest code fences correctly (fix MD040) — use 4‑backtick outer fence.
Current inner ```ruby ends the outer block.-```markdown +````markdown ## Database queries running slow? Let's optimize them together. ### Optimizing a slow query ```ruby # Your code hereTip: Remember: Always measure before optimizing!
Conclusion
Consider next steps and explore related posts for deeper learning.
-```
+````</blockquote></details> <details> <summary>docs/30-39-architecture/37-css-utility-class-reference.md (2)</summary><blockquote> `9-17`: **Add a language to the fenced block (fix MD040).** Use text for naming convention examples. ```diff -``` +```text .[prefix]-[property]-[value] .[prefix]-[property]-[modifier]-[value] Examples: .u-m-4 → utility margin 4 units .u-text-lg → utility text large .u-md:block → utility medium-breakpoint block--- `475-490`: **Clarify variant syntax support (md:, hover:).** Colon-prefixed variants require a build tool (e.g., Tailwind/UnoCSS). If you’re shipping raw CSS utilities, document an alternative (e.g., u-md-block) or state the required tooling. </blockquote></details> <details> <summary>test/support/hugo_helpers.rb (2)</summary><blockquote> `111-114`: **Serve charset with HTML responses.** Minor correctness. ```diff - [200, {"Content-Type" => "text/html"}, [content]] + [200, {"Content-Type" => "text/html; charset=utf-8"}, [content]]
12-22: Naming nit: HUGO_OPTIONS also includes the executable.
Either rename to HUGO_CMD or drop "hugo" from the array and prepend at callsite.docs/30-39-architecture/35-css-semantic-architecture-guide.md (1)
217-247: Add a language to the directory tree fence (fix MD040).-``` +```text assets/css/ ├── settings/ │ ├── _variables.css /* CSS custom properties */ ... └── utilities/ ├── _spacing.css /* Spacing utilities */ ├── _typography.css /* Text utilities */ └── _display.css /* Display utilities */</blockquote></details> <details> <summary>CLAUDE.md (3)</summary><blockquote> `1516-1519`: **Typo in grep pattern likely breaks validation example** `grep -r "partial.*svgiw"` looks like a misspelling of `svg`. Please correct to avoid misleading readers. Apply this diff: ```diff - grep -r "partial.*svgiw" themes/ | head -5 + grep -r "partial.*svg" themes/ | head -5
1690-1695: Prefer environment-driven port in examples to match project conventionsDocs hardcode
--port 1315. Consider referencingTEST_SERVER_PORT(as in tests/CI) to avoid drift with code and pipelines.Example:
- hugo server --port 1315 --bind 127.0.0.1 > server-test.log 2>&1 & + hugo server --port "${TEST_SERVER_PORT:-1315}" --bind 127.0.0.1 > server-test.log 2>&1 &
4527-4531: Fix typos in enforcement notesMinor language nits reduce clarity: “exciption” → “exception”, “cooperatin” → “cooperation”, “follwoing” → “following”.
- Do not mask bugs with exciption handlers at all. Only if it requested then add exception handler! - Use the most conservative way, through cooperatin and follwoing xp practices. + Do not mask bugs with exception handlers at all. Only if it is requested, then add an exception handler. + Use the most conservative way, through cooperation and following XP practices.docs/bem-conversion-strategy.md (1)
76-88: Unclear placeholder variable in Hugo resources bundle
$dynamicCSS586appears arbitrary and undocumented; risks confusion if copied verbatim.Consider renaming to an intentional placeholder or removing:
- $dynamicCSS586 + /* Optional: insert page-specific CSS resources here */Do you actually have a
$dynamicCSS586variable in the theme?BEM_IMPLEMENTATION_GUIDE.md (1)
69-90: Markdownlint: heading trailing colon (MD026)Two headings end with a colon; remove to satisfy common linters.
- ### Before (FL Builder): + ### Before (FL Builder) - ### After (Dual System): + ### After (Dual System)test/unit/meta_tags/seo_schema_test.rb (2)
60-62: Avoid assertionless early returns; assert file presence insteadReturning early can yield zero-assertion tests. Assert the artifact exists to uphold test guarantees.
- return unless File.exist?(File.join(root_path, blog_file)) + assert File.exist?(File.join(root_path, blog_file)), + "Missing built file #{blog_file}. Ensure HUGO_PUBLIC_DIR is built." - return unless File.exist?(File.join(root_path, service_file)) + assert File.exist?(File.join(root_path, service_file)), + "Missing built file #{service_file}. Ensure HUGO_PUBLIC_DIR is built."Also applies to: 101-104
205-207: Wrong placeholder key in message
test_case[:page]is nil; should be:file.- parsed = assert_valid_json(json_content, "Schema type collection for #{test_case[:page]}") + parsed = assert_valid_json(json_content, "Schema type collection for #{test_case[:file]}")test/unit/hugo_asset_validation_test.rb (2)
7-9: Remove unused regex constants or use them
SVG_ASSET_PATTERN,CSS_ASSET_PATTERN,JS_ASSET_PATTERNare declared but unused.- SVG_ASSET_PATTERN = /(?:src|href)="([^"]*\.svg[^"]*)"/ - CSS_ASSET_PATTERN = /href="([^"]*\.css[^"]*)"/ - JS_ASSET_PATTERN = /src="([^"]*\.js[^"]*)"/ + # (removed) Unused patternsOr refactor extraction loops to leverage them.
22-28: Permit 127.0.0.1 in addition to localhostIn some CI/dev setups assets resolve to 127.0.0.1. Accept both.
- assert_equal EXPECTED_HOST, uri.host, "SVG should use correct host: #{src}" + assert_includes %w[localhost 127.0.0.1], uri.host, "SVG should use correct host: #{src}"(Apply similarly for CSS/JS/image checks.)
Also applies to: 42-48, 62-68, 82-88
test/unit/meta_tags/service_schema_test.rb (1)
32-34: Harden type assertion for provider
@typemay be a String or Array. Normalize before asserting.- assert_includes provider["@type"], "Organization", "Provider not an Organization" + assert_includes Array(provider["@type"]), "Organization", "Provider not an Organization"test/unit/base_page_test_case.rb (1)
9-9: Optional: provide a shim file to ease transition.If other PRs or local branches still require "base_page_test", add a lightweight shim to avoid future breakages.
Add new file test/unit/base_page_test.rb:
# Temporary shim to support older tests; remove after migration require_relative "base_page_test_case"test/unit/meta_tags/article_schema_test.rb (2)
32-34: Loosen author type to allow Person or Organization.Schema.org allows both; current assertion is brittle.
Apply this diff:
- assert_equal "Organization", author["@type"] + assert_includes ["Organization", "Person"], author["@type"]
45-50: Harden parsing when publisher is a String; fail with a clear message on invalid JSON.
JSON.parsewill explode ifpublisheris a plain string (e.g., "JetThoughts"). Add a guarded parse and explicit failure.Apply this diff:
- # Handle publisher whether it's a string or object - publisher_data = publisher.is_a?(String) ? JSON.parse(publisher) : publisher + # Handle publisher whether it's a string or object + begin + publisher_data = + if publisher.is_a?(String) + publisher.strip.start_with?("{") ? JSON.parse(publisher) : { "name" => publisher } + else + publisher + end + rescue JSON::ParserError => e + flunk "Publisher is a String but not valid JSON: #{publisher.inspect} (#{e.message})" + endIf
jsonisn’t already required by the base test helpers, addrequire "json"at the top of this file or in the shared helper.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (40)
.github/workflows/test-unit.yml(1 hunks).gitignore(1 hunks)BEM_IMPLEMENTATION_GUIDE.md(1 hunks)CLAUDE.md(3 hunks)TODO.md(1 hunks)content/blog/building-scalable-rails-apis-architecture-design-patterns.md(1 hunks)content/blog/how-to-manage-developers-when-you-cant-code.md(1 hunks)content/blog/internal-product-teams-cost-center-to-profit-driver.md(1 hunks)content/blog/rails-7-upgrade-guide-step-by-step-migration.md(1 hunks)content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md(1 hunks)content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md(1 hunks)content/blog/rails-performance-optimization-15-proven-techniques.md(1 hunks)content/blog/ruby-memory-management-best-practices-large-applications.md(1 hunks)content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md(1 hunks)content/lead-magnets/developer-performance-scorecard.md(1 hunks)content/services/emergency-cto.md(1 hunks)docs/30-39-architecture/35-css-semantic-architecture-guide.md(1 hunks)docs/30-39-architecture/36-css-migration-roadmap.md(1 hunks)docs/30-39-architecture/37-css-utility-class-reference.md(1 hunks)docs/30-39-architecture/38-css-component-hierarchy.md(1 hunks)docs/70-79-templates-boilerplates/70.08-content-writing-guidelines-reference.md(3 hunks)docs/bem-conversion-strategy.md(1 hunks)docs/jetthoughts-content-style-guide.md(1 hunks)test/application_system_test_case.rb(2 hunks)test/support/hugo_helpers.rb(3 hunks)test/unit/asset_url_validation_test.rb(1 hunks)test/unit/base_page_test_case.rb(1 hunks)test/unit/diagram_rendering_test.rb(1 hunks)test/unit/hugo_asset_validation_test.rb(2 hunks)test/unit/hugo_partials_test.rb(1 hunks)test/unit/meta_tags/article_schema_test.rb(1 hunks)test/unit/meta_tags/breadcrumb_schema_test.rb(1 hunks)test/unit/meta_tags/meta_tags_test.rb(1 hunks)test/unit/meta_tags/organization_schema_test.rb(1 hunks)test/unit/meta_tags/seo_schema_test.rb(1 hunks)test/unit/meta_tags/service_schema_test.rb(1 hunks)test/unit/template_cleanup_validation_test.rb(1 hunks)test/unit/testimonial_shortcode_test.rb(1 hunks)themes/beaver/assets/css/utilities.css(1 hunks)themes/beaver/layouts/shortcodes/cta.html(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
- content/services/emergency-cto.md
- content/blog/rails-performance-optimization-15-proven-techniques.md
- themes/beaver/layouts/shortcodes/cta.html
- content/blog/building-scalable-rails-apis-architecture-design-patterns.md
- content/blog/rails-7-upgrade-guide-step-by-step-migration.md
- content/blog/how-to-manage-developers-when-you-cant-code.md
- docs/30-39-architecture/38-css-component-hierarchy.md
- themes/beaver/assets/css/utilities.css
- test/application_system_test_case.rb
- TODO.md
🧰 Additional context used
📓 Path-based instructions (3)
test/**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
Ruby test files must follow the *_test.rb naming convention and live under test/
Files:
test/unit/asset_url_validation_test.rbtest/unit/hugo_partials_test.rbtest/unit/template_cleanup_validation_test.rbtest/unit/meta_tags/meta_tags_test.rbtest/unit/diagram_rendering_test.rbtest/unit/meta_tags/service_schema_test.rbtest/unit/testimonial_shortcode_test.rbtest/unit/meta_tags/breadcrumb_schema_test.rbtest/unit/meta_tags/seo_schema_test.rbtest/unit/base_page_test_case.rbtest/unit/meta_tags/article_schema_test.rbtest/unit/hugo_asset_validation_test.rbtest/unit/meta_tags/organization_schema_test.rbtest/support/hugo_helpers.rb
test/**/*_test.rb
📄 CodeRabbit inference engine (CLAUDE.md)
test/**/*_test.rb: Do not use puts, print, or p statements in test files (no output masking)
Every test must include at least one assertion (assert_, refute_, or flunk)
Do not use skip() to mask tests (zero-tolerance test masking)
Files:
test/unit/asset_url_validation_test.rbtest/unit/hugo_partials_test.rbtest/unit/template_cleanup_validation_test.rbtest/unit/meta_tags/meta_tags_test.rbtest/unit/diagram_rendering_test.rbtest/unit/meta_tags/service_schema_test.rbtest/unit/testimonial_shortcode_test.rbtest/unit/meta_tags/breadcrumb_schema_test.rbtest/unit/meta_tags/seo_schema_test.rbtest/unit/meta_tags/article_schema_test.rbtest/unit/hugo_asset_validation_test.rbtest/unit/meta_tags/organization_schema_test.rb
**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rb: Do not hardcode port 1314; use ENV.fetch("TEST_SERVER_PORT", "1314") instead
Do not hardcode the public path; use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') instead of literal paths like "_dest/public-test"
Files:
test/unit/asset_url_validation_test.rbtest/unit/hugo_partials_test.rbtest/unit/template_cleanup_validation_test.rbtest/unit/meta_tags/meta_tags_test.rbtest/unit/diagram_rendering_test.rbtest/unit/meta_tags/service_schema_test.rbtest/unit/testimonial_shortcode_test.rbtest/unit/meta_tags/breadcrumb_schema_test.rbtest/unit/meta_tags/seo_schema_test.rbtest/unit/base_page_test_case.rbtest/unit/meta_tags/article_schema_test.rbtest/unit/hugo_asset_validation_test.rbtest/unit/meta_tags/organization_schema_test.rbtest/support/hugo_helpers.rb
🧠 Learnings (1)
📚 Learning: 2025-09-16T20:48:45.991Z
Learnt from: CR
PR: jetthoughts/jetthoughts.github.io#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T20:48:45.991Z
Learning: Applies to **/*.rb : Do not hardcode the public path; use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') instead of literal paths like "_dest/public-test"
Applied to files:
test/unit/hugo_asset_validation_test.rbtest/support/hugo_helpers.rb
🧬 Code graph analysis (2)
test/unit/hugo_asset_validation_test.rb (1)
test/sync_test_case.rb (1)
setup(19-91)
test/support/hugo_helpers.rb (1)
test/unit/base_page_test_case.rb (1)
private(9-91)
🪛 GitHub Actions: unit-tests
test/unit/asset_url_validation_test.rb
[error] 1-1: bundle exec rake test TEST='test/unit/**/*_test.rb' failed with exit code 1. LoadError: cannot load such file -- /home/runner/work/jetthoughts.github.io/jetthoughts.github.io/test/unit/base_page_test (LoadError).
🪛 markdownlint-cli2 (0.17.2)
docs/30-39-architecture/35-css-semantic-architecture-guide.md
217-217: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
BEM_IMPLEMENTATION_GUIDE.md
69-69: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
90-90: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
content/blog/ruby-on-rails-testing-strategy-unit-tests-integration.md
36-36: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
169-169: Headings must start at the beginning of the line
(MD023, heading-start-left)
176-176: Headings must start at the beginning of the line
(MD023, heading-start-left)
180-180: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
187-187: Headings must start at the beginning of the line
(MD023, heading-start-left)
192-192: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
210-210: Headings must start at the beginning of the line
(MD023, heading-start-left)
214-214: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
227-227: Headings must start at the beginning of the line
(MD023, heading-start-left)
234-234: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
244-244: Headings must start at the beginning of the line
(MD023, heading-start-left)
249-249: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
282-282: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
312-312: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
1111-1111: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
1172-1172: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
1194-1194: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
content/blog/internal-product-teams-cost-center-to-profit-driver.md
119-119: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
125-125: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
131-131: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
137-137: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
235-235: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
241-241: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
246-246: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
265-265: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
270-270: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
282-282: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
289-289: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
294-294: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md
138-138: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
157-157: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
183-183: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
295-295: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
315-315: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
422-422: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
438-438: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
452-452: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
476-476: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
492-492: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
526-526: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
551-551: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
588-588: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
619-619: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
638-638: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
682-682: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
758-758: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
785-785: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
819-819: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
842-842: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
874-874: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
912-912: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
982-982: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
988-988: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
990-990: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
996-996: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
998-998: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
1004-1004: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
1006-1006: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md
2-2: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
content/blog/ruby-memory-management-best-practices-large-applications.md
460-460: Multiple headings with the same content
(MD024, no-duplicate-heading)
docs/30-39-architecture/36-css-migration-roadmap.md
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
269-269: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
277-277: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
docs/30-39-architecture/37-css-utility-class-reference.md
9-9: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/jetthoughts-content-style-guide.md
2-2: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
81-81: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (10)
.gitignore (1)
82-82: LGTM; confirm intended scope for_tmp/.As written,
_tmp/ignores any directory named_tmpanywhere in the repo (not just at the root), matching the existingtmp/and_temp/entries. If you only intend to ignore the root-level folder, consider anchoring it as/_tmp/. Otherwise, this addition looks good.content/blog/ruby-memory-management-best-practices-large-applications.md (2)
660-682: GC env vars are Ruby-version specific — add a version note.Some keys differ or are tuned per release; advise readers to verify for their Ruby version.
# Environment variables for GC tuning +# +> Note: Names/semantics vary across Ruby versions. Validate with `ruby -v` and `GC.stat` docs for your runtime before adopting these values.
852-860: Potential non-existent GC.stat key.Verify
:heap_final_slotsexists in your target Ruby; if not, replace with a supported key (e.g., :heap_free_slots).content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md (3)
9-9: Double-check canonical URL target.Canonical points to jetthoughts.com. If this post also publishes on github.io, this is fine; otherwise, set canonical to the primary URL actually serving this content to avoid SEO duplication.
25-37: Confirm Mermaid rendering in Hugo.Ensure Mermaid is enabled (e.g., via a shortcode or assets pipeline). Otherwise code blocks will render as plain text.
172-181: Counter cache backfill call is wrong.
User.reset_counters(User.ids, :posts)doesn’t accept an array. Backfill withfind_each.- User.reset_counters(User.ids, :posts) + User.find_each(batch_size: 1000) { |u| User.reset_counters(u.id, :posts) }Likely an incorrect or invalid review comment.
content/blog/internal-product-teams-cost-center-to-profit-driver.md (1)
388-392: Verify CTA target exists: /resources/internal-product-roi-calculatorRepo search found no matching page or static asset — add the resource at that path or update/remove the CTA link.
Location: content/blog/internal-product-teams-cost-center-to-profit-driver.md (lines 388–392).
.github/workflows/test-unit.yml (1)
14-19: No change required — ruby/setup-ruby@v1 will install Ruby 3.4.ruby/setup-ruby downloads prebuilt Rubies and accepts short versions like '3.4', so ubuntu-latest does not need to already include Ruby 3.4; keep using ruby/setup-ruby@v1 (or pin a specific patch for reproducible builds). (github.com)
docs/70-79-templates-boilerplates/70.08-content-writing-guidelines-reference.md (1)
1-287: Well-structured, actionable guideClear structure, concrete templates, and quality gates look solid.
test/unit/meta_tags/seo_schema_test.rb (1)
4-15: Inheritance refactor LGTM (once require is fixed)Switch to
BasePageTestCasealigns with the suite. After fixing the require path, this looks consistent.
| - name: Run unit tests | ||
| env: | ||
| PRECOMPILED_ASSETS: '1' | ||
| TEST_SERVER_PORT: '1314' | ||
| run: bundle exec rake test TEST='test/unit/**/*_test.rb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Ensure precompiled site exists at the path tests read.
CI sets PRECOMPILED_ASSETS=1, so Hugo won’t build in tests. Verify HTML is present under the expected public dir.
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ROOT="${HUGO_PUBLIC_DIR:-${HUGO_DEFAULT_PATH:-_dest/public-test}}"
PORT="${TEST_SERVER_PORT:-1314}"
echo "Checking ${ROOT} and ${ROOT}-${PORT}"
if [ -d "${ROOT}-${PORT}" ]; then BASE="${ROOT}-${PORT}"; else BASE="${ROOT}"; fi
fd -t f index.html "$BASE" || { echo "Missing precompiled HTML under $BASE"; exit 1; }Length of output: 207
Precompiled Hugo output missing — add prebuilt HTML or build site in CI
CI sets PRECOMPILED_ASSETS=1 so tests expect static HTML; verification script returned "Missing precompiled HTML under _dest/public-test" (fd: Search path '_dest/public-test' is not a directory).
File: .github/workflows/test-unit.yml (lines 20–24). Action: add the precompiled site to _dest/public-test (or set HUGO_PUBLIC_DIR/HUGO_DEFAULT_PATH to an existing prebuilt public dir), or change the workflow to build the site / unset/override PRECOMPILED_ASSETS so tests can run.
🤖 Prompt for AI Agents
In .github/workflows/test-unit.yml around lines 20-24 the workflow sets
PRECOMPILED_ASSETS=1 so tests expect prebuilt static HTML under
_dest/public-test but the CI currently fails with "Missing precompiled HTML
under _dest/public-test"; fix by either (A) adding a step before tests that
builds the Hugo site into _dest/public-test (or sets
HUGO_PUBLIC_DIR/HUGO_DEFAULT_PATH to point to an existing prebuilt public dir)
or (B) remove or override PRECOMPILED_ASSETS in this job so tests build or use
dynamic assets; implement one of these options and ensure the created directory
_dest/public-test contains the expected public HTML before the rake test runs.
| image: "/blog/internal-product-teams/internal-product-roi-transformation.jpg" | ||
| draft: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify hero image exists at the referenced path.
Ensure the asset is committed under static/blog/internal-product-teams/.
🏁 Script executed:
#!/bin/bash
set -euo pipefail
fd -HI -t f 'internal-product-roi-transformation.jpg' static assets || { echo "Image not found"; exit 1; }Length of output: 0
🏁 Script executed:
#!/bin/bash
set -euo pipefail
name='internal-product-roi-transformation.jpg'
results=""
# search in common asset dirs
for dir in static assets; do
if [ -d "$dir" ]; then
found="$(find "$dir" -type f -iname "$name" -print -quit || true)"
if [ -n "$found" ]; then
results="$found"
break
fi
fi
done
# fallback to git indexed files
if [ -z "$results" ] && command -v git >/dev/null 2>&1; then
results="$(git ls-files 2>/dev/null | grep -i -F -- "$name" || true)"
fi
if [ -z "$results" ]; then
echo "Image not found"
exit 1
else
printf '%s\n' "$results"
fiLength of output: 15
Missing hero image — add or update asset.
Frontmatter in content/blog/internal-product-teams-cost-center-to-profit-driver.md (lines 8–9) references /blog/internal-product-teams/internal-product-roi-transformation.jpg but the file is not present in the repository. Commit the image to static/blog/internal-product-teams/internal-product-roi-transformation.jpg or update the frontmatter to point to an existing asset.
🤖 Prompt for AI Agents
In content/blog/internal-product-teams-cost-center-to-profit-driver.md around
lines 8 to 9, the frontmatter references
"/blog/internal-product-teams/internal-product-roi-transformation.jpg" which is
missing from the repo; either add the image file at
static/blog/internal-product-teams/internal-product-roi-transformation.jpg
(commit the new asset) or update the frontmatter image path to point to an
existing image in static/, ensuring the path is correct (no leading slash if
your setup requires relative paths) and the file is committed.
| # Index for search functionality | ||
| add_index :posts, :title, using: :gin # For PostgreSQL full-text search | ||
| end | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect GIN index example for full‑text/search.
add_index :posts, :title, using: :gin is invalid for plain text without an operator class or expression. Suggest either pg_trgm or tsvector.
Replace with one of:
- add_index :posts, :title, using: :gin # For PostgreSQL full-text search
+ enable_extension :pg_trgm
+ add_index :posts, :title, using: :gin, opclass: :gin_trgm_ops # trigram searchOr expression index for full text:
enable_extension :unaccent
execute <<~SQL
CREATE INDEX index_posts_on_title_fts
ON posts
USING gin (to_tsvector('english', unaccent(coalesce(title,''))));
SQL🤖 Prompt for AI Agents
In content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md
around lines 102 to 105, the example `add_index :posts, :title, using: :gin` is
invalid for plain text; replace it with a correct index for full‑text/search by
either adding a pg_trgm trigram GIN index (e.g. enable the pg_trgm extension and
create a gin index on title using the trigram operator class) or creating a GIN
expression index on a tsvector (enable unaccent if desired and create a GIN
index on to_tsvector('english', unaccent(coalesce(title, '')))); ensure the
needed extensions are enabled before creating the index and update the migration
accordingly.
| # config/puma.rb | ||
| # Tune GC for better performance | ||
| GC.tune({ | ||
| RUBY_GC_HEAP_GROWTH_FACTOR: 1.1, | ||
| RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 100000, | ||
| RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 2.0 | ||
| }) | ||
| on_worker_boot do | ||
| GC.compact # Compact heap on worker boot | ||
| end | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GC.tune is not a Ruby API; use supported GC controls.
Ruby MRI does not expose GC.tune. Set GC env vars outside the app and use supported methods like GC.auto_compact= and GC.compact.
- # Tune GC for better performance
- GC.tune({
- RUBY_GC_HEAP_GROWTH_FACTOR: 1.1,
- RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 100000,
- RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 2.0
- })
+ # Prefer environment variables in your deploy (e.g., RUBY_GC_HEAP_GROWTH_FACTOR)
+ GC.auto_compact = true if GC.respond_to?(:auto_compact=)Retain GC.compact on boot if you’ve measured benefits.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # config/puma.rb | |
| # Tune GC for better performance | |
| GC.tune({ | |
| RUBY_GC_HEAP_GROWTH_FACTOR: 1.1, | |
| RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 100000, | |
| RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 2.0 | |
| }) | |
| on_worker_boot do | |
| GC.compact # Compact heap on worker boot | |
| end | |
| ``` | |
| # config/puma.rb | |
| # Prefer environment variables in your deploy (e.g., RUBY_GC_HEAP_GROWTH_FACTOR) | |
| GC.auto_compact = true if GC.respond_to?(:auto_compact=) | |
| on_worker_boot do | |
| GC.compact # Compact heap on worker boot | |
| end |
🤖 Prompt for AI Agents
In content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/index.md
around lines 479–490, remove the invalid GC.tune block (GC.tune is not a Ruby
MRI API), move any GC environment variable configuration
(RUBY_GC_HEAP_GROWTH_FACTOR, RUBY_GC_HEAP_GROWTH_MAX_SLOTS,
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR) to your process/environment (systemd,
Dockerfile, or deploy/runtime ENV), and replace in-app tuning with supported
calls such as setting GC.auto_compact = true/false as appropriate and keeping
GC.compact inside on_worker_boot so the worker still compacts the heap on boot.
| # Rails Scaling Performance Checklist | ||
| *From 10K to 1M users - Your step-by-step optimization roadmap* | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add front matter so Hugo builds this page consistently.
This file lacks a front matter block; many themes require it for title, date, and SEO.
+ ---
+ title: "Rails Scaling Performance Checklist"
+ slug: "rails-scaling-checklist"
+ date: "2025-01-16T10:00:00Z"
+ lastmod: "2025-09-17T00:00:00Z"
+ draft: false
+ ---
- # Rails Scaling Performance ChecklistOptionally keep the H1 if your theme doesn’t auto-render titles.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Rails Scaling Performance Checklist | |
| *From 10K to 1M users - Your step-by-step optimization roadmap* | |
| --- | |
| title: "Rails Scaling Performance Checklist" | |
| slug: "rails-scaling-checklist" | |
| date: "2025-01-16T10:00:00Z" | |
| lastmod: "2025-09-17T00:00:00Z" | |
| draft: false | |
| --- | |
| *From 10K to 1M users - Your step-by-step optimization roadmap* |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
2-2: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🤖 Prompt for AI Agents
In
content/blog/rails-performance-at-scale-10k-to-1m-users-roadmap/rails-scaling-checklist.md
around lines 1-3, this markdown file is missing a Hugo front matter block; add a
YAML (or TOML) front matter at the very top including at minimum title, date,
and draft (e.g., title: "Rails Scaling Performance Checklist", date: YYYY-MM-DD,
draft: false) and optionally description/tags/author for SEO; keep or remove the
existing H1 below as desired by the theme but ensure the front matter is the
first thing in the file so Hugo builds the page consistently.
| require_relative "../base_page_test" | ||
|
|
||
| class OrganizationSchemaTest < BasePageTest | ||
| class OrganizationSchemaTest < BasePageTestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix relative require path after base class rename.
File sits in a subdirectory; adjust one level up path accordingly.
-require_relative "../base_page_test"
+require_relative "../base_page_test_case"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| require_relative "../base_page_test" | |
| class OrganizationSchemaTest < BasePageTest | |
| class OrganizationSchemaTest < BasePageTestCase | |
| require_relative "../base_page_test_case" | |
| class OrganizationSchemaTest < BasePageTestCase |
🤖 Prompt for AI Agents
In test/unit/meta_tags/organization_schema_test.rb lines 1-3, the
require_relative path must be adjusted to account for the file being in a
subdirectory; update the require_relative to point one level up to the base test
file (use "../../base_page_test" instead of "../base_page_test") so the correct
base class file is loaded.
| @@ -1,6 +1,6 @@ | |||
| require_relative "../base_page_test" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Require path mismatch with new base class
Update require to match BasePageTestCase.
-require_relative "../base_page_test"
+require_relative "../base_page_test_case"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| require_relative "../base_page_test" | |
| require_relative "../base_page_test_case" |
🤖 Prompt for AI Agents
In test/unit/meta_tags/service_schema_test.rb around line 1, the
require_relative points to the old base file; update the require to reference
the new BasePageTestCase file (e.g. require_relative "../base_page_test_case")
and ensure the test class inherits from BasePageTestCase (adjust the class name
if necessary) so the correct base test class is loaded.
| require_relative "base_page_test" | ||
|
|
||
| class TemplateCleanupValidationTest < BasePageTest | ||
| class TemplateCleanupValidationTest < BasePageTestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update require to new base file.
Prevents LoadError during unit test run.
-require_relative "base_page_test"
+require_relative "base_page_test_case"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| require_relative "base_page_test" | |
| class TemplateCleanupValidationTest < BasePageTest | |
| class TemplateCleanupValidationTest < BasePageTestCase | |
| require_relative "base_page_test_case" | |
| class TemplateCleanupValidationTest < BasePageTestCase |
🤖 Prompt for AI Agents
In test/unit/template_cleanup_validation_test.rb lines 1-3, the require_relative
is pointing to the old base file ("base_page_test") which causes LoadError;
update the require to reference the new base file (e.g., replace with
require_relative "base_test" or the project's current test helper/base file
name) so the test loads the correct base class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
test/unit/meta_tags/seo_schema_test.rb (1)
31-34: Do not use skip() in tests; fail or assert instead.
Replace skip with an assertion to comply with zero-tolerance masking.- if json_content.empty? - skip "Schema #{index} on #{file_path} is empty - might indicate template issue" - end + refute json_content.empty?, + "Schema #{index} on #{file_path} is empty - might indicate template issue"test/base_page_test_case.rb (1)
12-14: Use HUGO_PUBLIC_DIR (not HUGO_DEFAULT_PATH) — update tests & CI
- Replace ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test") → ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test") in:
- test/base_page_test_case.rb:13
- test/application_system_test_case.rb:29
- test/support/hugo_helpers.rb:7
- Add HUGO_PUBLIC_DIR: '_dest/public-test' to .github/workflows/test-unit.yml env (near lines 22–23).
- def root_path - ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test") - end + def root_path + ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test") + end
♻️ Duplicate comments (1)
test/application_system_test_case.rb (1)
21-27: Eliminate hardcoded 1314 and add Capybara.server_port fallback.
Avoid literal 1314 per guidelines and add a fallback to Capybara.server_port; also consistently use ENV.fetch with a default.-current_port = if ENV["TEST_SERVER_PORT"] - ENV.fetch("TEST_SERVER_PORT").to_i -elsif Capybara.current_session&.server&.port - Capybara.current_session.server.port -else - 1314 -end +current_port = if ENV["TEST_SERVER_PORT"] + ENV.fetch("TEST_SERVER_PORT", "1314").to_i +elsif Capybara.current_session&.server&.port + Capybara.current_session.server.port +elsif Capybara.server_port + Capybara.server_port +else + ENV.fetch("TEST_SERVER_PORT", "1314").to_i +end
🧹 Nitpick comments (3)
test/unit/meta_tags/seo_schema_test.rb (1)
205-207: Incorrect key in error context message (:pagevs:file).
Use the existing:filekey to avoid nil context in messages.- parsed = assert_valid_json(json_content, "Schema type collection for #{test_case[:page]}") + parsed = assert_valid_json(json_content, "Schema type collection for #{test_case[:file]}")test/base_page_test_case.rb (2)
7-7: Pass port from ENV to align with guidelines.Use ENV.fetch("TEST_SERVER_PORT", "1314") rather than nil to keep baseURL deterministic.
-Hugo.new.precompile(port: nil) +Hugo.new.precompile(port: ENV.fetch("TEST_SERVER_PORT", "1314"))
16-21: Minor: build paths with File.join.Avoid manual string concat for portability.
- html_path = "#{root_path}/#{relative_path}" + html_path = File.join(root_path, relative_path)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
test/application_system_test_case.rb(2 hunks)test/base_page_test_case.rb(1 hunks)test/test_helper.rb(0 hunks)test/unit/asset_url_validation_test.rb(1 hunks)test/unit/diagram_rendering_test.rb(1 hunks)test/unit/hugo_asset_validation_test.rb(2 hunks)test/unit/hugo_partials_test.rb(1 hunks)test/unit/meta_tags/article_schema_test.rb(1 hunks)test/unit/meta_tags/breadcrumb_schema_test.rb(1 hunks)test/unit/meta_tags/meta_tags_test.rb(1 hunks)test/unit/meta_tags/organization_schema_test.rb(1 hunks)test/unit/meta_tags/seo_schema_test.rb(1 hunks)test/unit/meta_tags/service_schema_test.rb(1 hunks)test/unit/template_cleanup_validation_test.rb(1 hunks)test/unit/testimonial_shortcode_test.rb(1 hunks)
💤 Files with no reviewable changes (1)
- test/test_helper.rb
🚧 Files skipped from review as they are similar to previous changes (6)
- test/unit/meta_tags/service_schema_test.rb
- test/unit/template_cleanup_validation_test.rb
- test/unit/testimonial_shortcode_test.rb
- test/unit/meta_tags/article_schema_test.rb
- test/unit/diagram_rendering_test.rb
- test/unit/hugo_asset_validation_test.rb
🧰 Additional context used
📓 Path-based instructions (3)
test/**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
Ruby test files must follow the *_test.rb naming convention and live under test/
Files:
test/base_page_test_case.rbtest/unit/hugo_partials_test.rbtest/unit/meta_tags/organization_schema_test.rbtest/unit/meta_tags/breadcrumb_schema_test.rbtest/unit/meta_tags/seo_schema_test.rbtest/unit/meta_tags/meta_tags_test.rbtest/unit/asset_url_validation_test.rbtest/application_system_test_case.rb
**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rb: Do not hardcode port 1314; use ENV.fetch("TEST_SERVER_PORT", "1314") instead
Do not hardcode the public path; use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') instead of literal paths like "_dest/public-test"
Files:
test/base_page_test_case.rbtest/unit/hugo_partials_test.rbtest/unit/meta_tags/organization_schema_test.rbtest/unit/meta_tags/breadcrumb_schema_test.rbtest/unit/meta_tags/seo_schema_test.rbtest/unit/meta_tags/meta_tags_test.rbtest/unit/asset_url_validation_test.rbtest/application_system_test_case.rb
test/**/*_test.rb
📄 CodeRabbit inference engine (CLAUDE.md)
test/**/*_test.rb: Do not use puts, print, or p statements in test files (no output masking)
Every test must include at least one assertion (assert_, refute_, or flunk)
Do not use skip() to mask tests (zero-tolerance test masking)
Files:
test/unit/hugo_partials_test.rbtest/unit/meta_tags/organization_schema_test.rbtest/unit/meta_tags/breadcrumb_schema_test.rbtest/unit/meta_tags/seo_schema_test.rbtest/unit/meta_tags/meta_tags_test.rbtest/unit/asset_url_validation_test.rb
🧠 Learnings (3)
📚 Learning: 2025-09-16T20:48:45.991Z
Learnt from: CR
PR: jetthoughts/jetthoughts.github.io#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T20:48:45.991Z
Learning: Applies to **/*.rb : Do not hardcode the public path; use ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test') instead of literal paths like "_dest/public-test"
Applied to files:
test/base_page_test_case.rbtest/application_system_test_case.rb
📚 Learning: 2025-09-16T20:48:45.991Z
Learnt from: CR
PR: jetthoughts/jetthoughts.github.io#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T20:48:45.991Z
Learning: Applies to test/**/*.rb : Ruby test files must follow the *_test.rb naming convention and live under test/
Applied to files:
test/unit/asset_url_validation_test.rb
📚 Learning: 2025-09-16T20:48:45.991Z
Learnt from: CR
PR: jetthoughts/jetthoughts.github.io#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T20:48:45.991Z
Learning: Applies to **/*.rb : Do not hardcode port 1314; use ENV.fetch("TEST_SERVER_PORT", "1314") instead
Applied to files:
test/application_system_test_case.rb
🧬 Code graph analysis (2)
test/base_page_test_case.rb (1)
test/support/hugo_helpers.rb (1)
precompile(24-36)
test/application_system_test_case.rb (1)
test/support/hugo_helpers.rb (2)
app(38-59)precompile(24-36)
🪛 GitHub Actions: unit-tests
test/base_page_test_case.rb
[error] 18-18: HTML file must exist: _dest/public-test/blog/devtools-for-ai-agents/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/devtools-for-ai-agents/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/devtools-for-ai-agents/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/devtools-for-ai-agents/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/test/components/diagram/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/test/components/diagram/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/test/components/diagram/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/careers/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/about-us/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/about-us/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/about-us/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/services/fractional-cto/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/categories/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/about-us/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/about-us/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/about-us/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/services/fractional-cto/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/4-lines-speed-up-your-rails-test-suite-on-circleci/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
[error] 18-18: HTML file must exist: _dest/public-test/blog/tips-for-writing-readable-system-tests-in-rails-capybara-ruby/index.html. Command run: bundle.exec rake test TEST='test/unit/**/*_test.rb'.
🔇 Additional comments (13)
test/application_system_test_case.rb (4)
10-12: Good switch to absolute requires for support helpers.
This aligns load paths across the suite.
15-18: ENV-driven server port setup looks correct.
Respects TEST_SERVER_PORT while keeping Capybara in sync.
32-34: Precompile gating by PRECOMPILED_ASSETS is correct.
Keeps CI fast and supports local builds.
60-71: Screenshot config refactor LGTM.
Hash style normalization and per-section tolerances look consistent.test/unit/meta_tags/seo_schema_test.rb (1)
1-1: Migration to BasePageTestCase is consistent.
Matches the harness refactor used elsewhere.Also applies to: 5-5
test/unit/hugo_partials_test.rb (1)
1-1: Base class and require update LGTM.
Aligned with the new test harness.Also applies to: 3-3
test/unit/meta_tags/breadcrumb_schema_test.rb (1)
1-1: Require and superclass migration LGTM.
Consistent with other meta_tags tests.Also applies to: 3-3
test/unit/meta_tags/meta_tags_test.rb (1)
1-1: Require and superclass migration LGTM.
Matches the suite-wide refactor.Also applies to: 3-3
test/base_page_test_case.rb (1)
5-6: Require via load path is fine.Works if test/ is on $LOAD_PATH (rake test usually adds -I test). No action.
If CI ever runs without -I test, switch to
require_relative "../support/hugo_helpers".test/unit/asset_url_validation_test.rb (2)
1-1: Base test require updated correctly.Using
require "base_page_test_case"is consistent with the new base. LGTM.
3-3: Inheritance updated to BasePageTestCase.Matches the harness migration. LGTM.
test/unit/meta_tags/organization_schema_test.rb (2)
1-1: Base test require updated correctly.Consistent with other tests. LGTM.
3-3: Inheritance updated to BasePageTestCase.All good.
| hugo_builder = Hugo.new(path: ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test"), port: current_port) | ||
| Capybara.app = hugo_builder.app | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
🧩 Analysis chain
Use HUGO_PUBLIC_DIR per repo guideline instead of HUGO_DEFAULT_PATH.
Standardize on ENV.fetch('HUGO_PUBLIC_DIR', '_dest/public-test').
-hugo_builder = Hugo.new(path: ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test"), port: current_port)
+hugo_builder = Hugo.new(path: ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test"), port: current_port)Run to find remaining occurrences to update:
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -nC2 -S 'HUGO_DEFAULT_PATH|HUGO_PUBLIC_DIR'Length of output: 4154
Standardize to HUGO_PUBLIC_DIR (replace HUGO_DEFAULT_PATH)
Use ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test") per repo guideline.
- test/application_system_test_case.rb (line 29) — replace:
-hugo_builder = Hugo.new(path: ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test"), port: current_port)
+hugo_builder = Hugo.new(path: ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test"), port: current_port)- test/base_page_test_case.rb (line 13) — replace:
- ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test")
+ ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test")- test/support/hugo_helpers.rb (line 7) — replace:
- base_path = path || ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test")
+ base_path = path || ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test")- Update docs/60.13-docker-test-precompilation-strategy.md (examples/usages at ~lines 71, 95, 104, 160, 182, 217) to use HUGO_PUBLIC_DIR and adjust explanatory text/examples accordingly.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| hugo_builder = Hugo.new(path: ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test"), port: current_port) | |
| Capybara.app = hugo_builder.app | |
| hugo_builder = Hugo.new(path: ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test"), port: current_port) | |
| Capybara.app = hugo_builder.app |
🤖 Prompt for AI Agents
In test/application_system_test_case.rb around lines 29-31, replace
ENV.fetch("HUGO_DEFAULT_PATH", "_dest/public-test") with
ENV.fetch("HUGO_PUBLIC_DIR", "_dest/public-test"); do the same replacement in
test/base_page_test_case.rb (line 13) and test/support/hugo_helpers.rb (line 7);
additionally update docs/60.13-docker-test-precompilation-strategy.md at the
example/usage locations (~lines 71, 95, 104, 160, 182, 217) to use
HUGO_PUBLIC_DIR and adjust any explanatory text/examples to reference the new
variable name.
* docs * add thoughtsbot styles * content * content * thoughtbot styles * fix * fix tests * cleanup * cleanup * cleanup some ref * cleanup tests * adds github tests * refactor test files to use base_page_test_case * disable tests
Summary by CodeRabbit
New Features
Documentation
Tests
Chores