Repository navigation
ci: tie the demo app's Rails defaults to the CI Rails matrix - #22
developerz-ai[bot] wants to merge 4 commits into
Conversation
config/application.rb's load_defaults version (7.2) becomes the single source of truth for the Rails floor CI resolves: bin/rails-versions derives its floor from it instead of a hardcoded 7.2, and the new bin/rails-defaults-check fails loudly when the app's floor, the CI matrix's oldest resolved entry and the floor advertised in README.md/llms.txt/AGENTS.md diverge. The gem's advertised Rails floor (Rails 7.2+) is unchanged. Dz-Task-Id: tsk_43ec5176c615e063bb636ec79a26ccd4
Benchmarks: aarch64 (linux)
escape_bench (C ext) · peak RSS 118 MB
escape_bench (pure Ruby) · peak RSS 150 MB
render_bench (C ext) · peak RSS 131 MB
render_bench (pure Ruby) · peak RSS 131 MB
tag_bench (C ext) · peak RSS 39 MB
tag_bench (pure Ruby) · peak RSS 26 MB
Rails request (C ext) · peak RSS 247 MB
|
Benchmarks: x86_64 (linux)
escape_bench (C ext) · peak RSS 119 MB
escape_bench (pure Ruby) · peak RSS 147 MB
render_bench (C ext) · peak RSS 132 MB
render_bench (pure Ruby) · peak RSS 132 MB
tag_bench (C ext) · peak RSS 39 MB
tag_bench (pure Ruby) · peak RSS 27 MB
Rails request (C ext) · peak RSS 235 MB
|
|
Resolve merge conflict on #22
Work landed on #22 — watching it toward merge. 8m · 14 tool calls · 7 messages 🤖 developerz.ai, an automated agent, not a human — developerz-ai[bot] |
|
Waiting on the repository owner: this pull request changes a gate file, which the platform does not merge by itself. It changes The merge check refused the edit: .github/workflows/ci.yml: an edit outside the declared transforms (T1 pin, T2 narrow, T3 template) under 'jobs' — a run: line, a step, a with:, an env: or a removed job is not one the platform declared for #22 — proof path: The task it answers planned this edit, so the goal cannot be met without it and it is not re-filed without them. To take it, merge it on GitHub. To have the platform merge it, push a narrower edit: a new head is checked again and merged when the check passes. Nothing here is re-tried or closed automatically, and no email is sent; the pull request is listed with the stuck pull requests. 🤖 Posted by developerz.ai — an automated agent, not a human. |
|
File fence widened for a CI fix. The
Why: The failing check "Security / bundle-audit" reads Gemfile.lock and reports Rails 8.1.4 vulnerable (log lines 174-341: actionmailbox/actionpack/actionview/activestorage/activesupport 8.1.4, e.g. GHSA-f3w6-w445-fwh9 Critical, all with "Solution: update to '>= 8.1.4.1'"). The lockfile pins rails (= 8.1.4) and every Rails component to 8.1.4, so only the lockfile can carry the patched release (8.1.4.1 is published; Gemfile's '~> 8.1' already allows it). Gemfile.lock is outside this round's exclusive file set, so it needs widening to regenerate. The platform granted it under the same area lock a new task takes (no other in-flight task holds these files), after checking the path is not a secret, CI configuration or a human-merge path. Posted automatically by the developerz bot (AI-authored). |
Follow-up intent: Fix failing CI on #22 Dz-Task-Id: tsk_91807250c18b8bb6f802584975b1aaa4
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code ⏱ 26s wall clock · 🤖 developerz.ai — automated review, running on your model and your box. |
There was a problem hiding this comment.
Review summary — 6 file(s), 4 finding(s).
Critical 0 · Major 0 · Minor 4 · Nit 0
Derives the CI Rails matrix floor from the demo app's config.load_defaults and adds bin/rails-defaults-check to catch drift, wired into the rails-versions CI job and ci-ok needs. Low risk: no gem code touched.
| File | Findings |
|---|---|
.github/workflows/ci.yml |
1 minor |
bin/rails-defaults-check |
1 minor |
spec/ci/rails_defaults_spec.rb |
2 minor |
- 1 noise file(s) auto-skipped (lockfiles/generated/vendored — re-include with path_filters)
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/MiniMax-M3 — 58.1k in / 1.16k out over 3 calls, on your flat-rate plan: no per-token charge (~$0.02 at list price).
Follow-up intent: Address review findings on #22 Dz-Task-Id: tsk_40c49f300874dbad5e9d25a42ee77923
There was a problem hiding this comment.
Review summary — 4 file(s), 0 finding(s).
Incremental PR: extends the Rails-floor guard to also compare AGENTS.md's advertised floor, prints labeled version pairs on success, and adds a spec proving a drifting advertised file fails the guard.
- concern-tests: nothing to review — Incremental test-surface changes: the guard's advertised-file list gained AGENTS.md, its success output now names each version with its label, and the spec asserts the labeled strings and adds a drift case that copies the guard tree into a tmpdir and rewrites AGENTS.md.
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/MiniMax-M3 — 45.6k in / 427 out over 2 calls, on your flat-rate plan: no per-token charge (~$0.01 at list price).
…he-app-s-rails-load-defaults-to-the-ci--43ec5176 # Conflicts: # AGENTS.md
There was a problem hiding this comment.
Review summary — 1 file(s), 0 finding(s).
Docs-only handoff edit: AGENTS.md documents the derived Rails floor (Scripts row now lists bin/rails-versions and bin/rails-defaults-check; new invariant edge 14), consistent with config/application.rb's load_defaults 7.2 and the guard.
- test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against
- concern-security: nothing to review — The only file in this slice is a docs-only AGENTS.md edit (Scripts row and a new invariant note); no code, auth surface, credential or injection path is touched, and the claims match the described wiring.
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/glm-5.3-flash — 39.9k in / 285 out over 2 calls, on your flat-rate plan: no per-token charge (~<$0.01 at list price).
What
config/application.rb's load_defaults version (7.2) becomes the single source of
truth for the Rails floor CI resolves: bin/rails-versions derives its floor from
it instead of a hardcoded 7.2, and the new bin/rails-defaults-check fails loudly
when the app's floor, the CI matrix's oldest resolved entry and the floor
advertised in README.md/llms.txt/AGENTS.md diverge. The gem's advertised Rails
floor (Rails 7.2+) is unchanged.
Acceptance
config.load_defaults 7.2; README.md:26, llms.txt:5 and AGENTS.md:22 still advertise 'Rails 7.2+' - the gem's advertised support floor is unchanged.rails-versionsstep runsruby bin/rails-versions, whose floor comes from config/application.rb.rails-versionsjob runsbin/rails-defaults-checkwith the resolved matrix andci-oklistsrails-versionsin its needs.railsjob runsbundle exec rspec spec/features spec/gem/rails, which loads config/environment and appliesconfig.load_defaults 7.2.Changes
config/application.rb(edit) — Keepconfig.load_defaults 7.2(the value must NOT change) and replace the generated comment with the invariant: this version is the demo app's Rails floor, the CI matrix's oldest entry is derived from it (bin/rails-versions), the gem advertises the same floor (README.md:26, llms.txt:5, AGENTS.md:22), and bin/rails-defaults-check fails CI when they drift. Say that raising it raises the app's floor and is the owner's call.bin/rails-versions(edit) — Derive the matrix floor from the demo app instead of the hardcoded '7.2' (line 12): parseconfig.load_defaults <version>from config/application.rb, abort with a clear message when it cannot be parsed, and add a--floormode that prints just that version and exits 0 without touching rubygems.org. An explicit MIN argument still overrides the listing; no other behaviour change.bin/rails-defaults-check(create) — New stdlib-only guard script (no bundler, no Rails). Compares the app's Rails floor (frombin/rails-versions --floor) with the floor advertised in README.md and llms.txt (both must state 'Rails X.Y+') and, when given the resolved matrix JSON as argv[1], with that matrix's oldest entry. Exits 1 with a message naming every version compared and the files to align; exits 0 when consistent..github/workflows/ci.yml(edit) — In therails-versionsjob (lines 206-216) drop the pinned7.2fromruby bin/rails-versionsand update the comment; add a step runningruby bin/rails-defaults-check "$VERSIONS"with the resolved matrix passed through an env var (the JSON contains double quotes, so pass it via env, not inline). Addrails-versionsto theci-okneeds list (line 268) so the guard's failure is named in the CI OK gate. Leave therailsmatrix job and canary.yml untouched.spec/ci/rails_defaults_spec.rb(create) — Offline spec (no Rails, no network): assertsruby bin/rails-versions --floorequals theconfig.load_defaultsvalue parsed from config/application.rb, thatruby bin/rails-defaults-checkexits 0 today, and that it exits non-zero with both versions in its message when handed a matrix whose oldest entry diverges (e.g. '["8.0"]'). Derive the expected versions from config/application.rb, never hardcode 7.2, so a legitimate floor change needs no spec edit.AGENTS.md(edit) — Handoff from editor:rails-floor: The demo app's Rails floor is now derived, not hardcoded: bin/rails-versions parses config/application.rb and bin/rails-defaults-check fails CI when the app floor, the advertised floor and the CI matrix's oldest entry drift apart. — AGENTS.md is the repo's agent-facing source of truth and its Scripts row ('bin/gem-smoke, bin/changelog-notes, bin/build-ext') and CI row do not mention the two new scripts, so the next agent would not know the floor is derived or that a guard exists. Please add bin/rails-versions (--floor mode) and bin/rails-defaults-check to the SVerification
./bin/checkpassed (exit 0) in 13s.What the editors ran to see the change working, and what they saw:
bundle exec rspec spec/ci/rails_defaults_spec.rb && bundle exec rubocop bin/rails-versions bin/rails-defaults-check spec/ci/rails_defaults_spec.rb config/application.rb(rails-floor): 3 examples, 0 failures; '4 files inspected, no offenses detected'ruby bin/rails-versions --floor(rails-floor): prints '7.2' and exits 0 (no network)ruby bin/rails-versions(rails-floor): prints ["7.2","8.0","8.1"] - same matrix the pinned '7.2' produced, now derived from config/application.rbruby bin/rails-defaults-check(rails-floor): 'Rails floor 7.2: app floor (config/application.rb), README.md, llms.txt agree.', exit 0ruby bin/rails-defaults-check '["8.0"]'(rails-floor): exit 1 with 'Rails floor mismatch:' naming 'app floor (config/application.rb): 7.2', 'CI matrix (oldest entry): 8.0' and 'Align CI matrix with config/application.rb: bin/rails-versions derives the CI matrix from it.'bundle exec rspec spec/ci/rails_defaults_spec.rb && bundle exec rubocop bin/rails-versions bin/rails-defaults-check spec/ci/rails_defaults_spec.rb config/application.rb(rails-floor): rspec: "3 examples, 0 failures" (Finished in 1.41 seconds); rubocop: "Inspecting 4 files / 4 files inspected, no offenses detected"; exit 0code_grep 'Rails [0-9][0-9.]*\+' over README.md and llms.txt(rails-floor): README.md:26 and README.md:31 both advertise "Rails 7.2+" and llms.txt:5 advertises "Rails 7.2+" — the guard dedupes README's two occurrences to a single "7.2", so README.md/llms.txt and the app's config.load_defaults 7.2 agree and bin/rails-defaults-check exits 0bundle exec rspec spec/ci/rails_defaults_spec.rb && bundle exec rubocop bin/rails-versions bin/rails-defaults-check spec/ci/rails_defaults_spec.rb config/application.rb(editor): 3 examples, 0 failures; then '4 files inspected, no offenses detected' (exit 0)ruby bin/rails-defaults-check '["7.2","8.0"]'(editor): EXIT=0 - 'Rails floor 7.2: app floor (config/application.rb), README.md, llms.txt, CI matrix (oldest entry) agree.'ruby bin/rails-defaults-check '["8.0","8.1"]'(editor): EXIT=1 - 'Rails floor mismatch: app floor (config/application.rb): 7.2 ... CI matrix (oldest entry): 8.0' (both versions named)Notes
Premises of the request the team disproved:
when "7.2"branch of load_defaults. The break that really happens is the reverse - an app whose load_defaults is NEWER than the matrix's oldest entry, which Rails rejects at boot withRuntimeError: Unknown version "8.0".Handoffs this run could not complete:
bin/rails-defaults-check— I wired the guard into the CI matrix job (it now runs on every CI run with the resolved matrix) and made the matrix floor derive from config/application.rb.; The policy names three advertised floors - README.md:26, llms.txt:5 and AGENTS.md:22 ('Rails 7.2+') - but the guard's ADVERTISED_FILES constant only covers README.md and llms.txt, so a drift in AGENTS.md would pass CI silently. Add 'AGENTS.md' to ADVERTISED_FILES (the script scans for /Rails (\d+(?:.\d+)*)+/ and AGENTS.md currently contains exactly one such string, 'Rails 7.2+', so the no-argument run keeps passing and the existing spec stays green). (named after the handoff rounds ran, by a repair round)🤖 Opened by developerz.ai for task
tsk_43ec5176c615e063bb636ec79a26ccd4on sebyx07/ruby2html.Raised automatically by the
raw_task_triagelane.