Repository navigation
v0.2.0 — Ruby 3.3+, latest dependencies, working admin engine, stripe 19
Warning
Breaking changes for hosts (pre-1.0, so this is a minor bump):
- Generated billing code targets
stripe ~> 19.0(was~> 13.0) and
raisesBilling::GatewayErrorwhere Stripe errors used to escape.
Hosts that rescuedStripe::*from the generated services must rescue
Billing::GatewayError. Match your Stripe webhook endpoint's API
version to2026-08-26.dahlia. - Generated code is not rewritten by a gem upgrade. See "Fixed" for the
manual steps (enginespec/dummy/config/cable.yml, admin engine).
Added
-
Integration suite: a default
seams:installhost must resolve its
bundle on a multi-platform lockfile (x86_64-linux, aarch64-linux,
arm64-darwin, x86_64-darwin). Guards the #42 class, where a gem shipping
only some native platforms brokebundleon Rails 8 lockfiles. Completes
#48. -
Community and AI-era repository standards:
SUPPORT.md,GOVERNANCE.md,
MAINTAINERS.md,CITATION.cff,.editorconfig,.github/FUNDING.yml,
anllms.txtmachine-readable index, andAGENTS.mdinstructions for AI
coding agents.doc/explanation/ARCHITECTURE.mdgains a "Where this design would
strain" section. Blank issues are now routed through the issue chooser. -
Install generator: ships an opinionated quality toolchain — a host is hardened
from the first CLI run.seams:installinstalls strong_migrations
(+ initializer, audits all migrations viastart_after = 0) and lefthook
(lefthook.yml: pre-commit rubocop, pre-push specs) by default, and wires a
from-scratchdb:migratesafety check into the generated CI. The rubocop/
brakeman/bundle-audit gems the generated CI shells out to are now injected
into the host Gemfile too. herb (HTML+ERB lint +.herb.yml) is available
but off by default — opt in with--herb— because its platform-specific
native gem breaks cold installs on multi-platform lockfiles (see commit
6c16c52). strong_migrations and lefthook are opt-out via
--no-strong-migrations/--no-lefthook. Also closes two gaps where Seams
generated migrations that nothing validated — the host CI now vets them. -
Permissions engine (
bin/seams permissions): generates a host-editable
role → ability grant map atconfig/initializers/seams_permissions.rb, backed
bySeams::PermissionRegistry/Seams::Permissionsand the
authorize_permission!controller helper. See [doc/reference/PERMISSIONS.md]. -
Admin engine (
bin/seams admin): opt-in Administrate dashboards with a Pundit
Platform/Tenantpolicy split and an admin audit trail writing
Core::AuditLogrows. See [doc/explanation/ARCHITECTURE_WAVE_11.md]. -
Design engine (
bin/seams design,--shell): a themeable design system —
33ui_*components, Tailwind v4@themetokens + component CSS,
Design::FormBuilder, a/design/guidegallery, and adesign:component
generator;--shellalso generates an application layout and a starter
signed-in dashboard. See [doc/design-system/DESIGN_SYSTEM.md].
Changed
- Generated host pins: rspec-rails is injected as
">= 7.1", "< 9"(was
"~> 7.1") in the host Gemfile and each engine Gemfile, so Rails 7.2+
hosts get rspec-rails 8.x. The generated CI usesactions/checkout@v7
and apostgres:18service; the Kamal Postgres accessory comment moves
topostgres:18and its volume to/var/lib/postgresql(18's layout). - Billing generator: the generated engine now targets stripe-ruby 19
(gem "stripe", "~> 19.0", was~> 13.0), which pins Stripe API version
2026-08-26.dahlia. Existing hosts runbundle update stripeand should
move their webhook endpoint to the same API version (the handlers accept
both shapes meanwhile). Changes in the generated code:- New
Billing::Stripe::Payloadreads Stripe objects and webhook hashes
alike. Handlers andInvoices::SyncServiceread the invoice's
subscription frominvoice.parent.subscription_details.subscriptionand
the period end fromitems.data[0].current_period_end(both moved in
2025-03-31.basil). The old top-levelinvoice.subscriptionand
subscription.current_period_endare still read as fallbacks. invoice.paidnow stores Stripe'sstatus_transitions.paid_atas
paid_atinstead of the time the webhook arrived.- Fixed
#digcalls on SDK responses (Gateways::Stripe#normalise_subscription,
Invoices::SyncService#paid_at_for).Stripe::StripeObjecthas no#dig,
so these raisedNoMethodErroron real API responses. Billing::Stripe::Clientre-raises everyStripe::StripeErroras
Billing::GatewayError(original on#cause). Every generated caller
already rescuedBilling::GatewayError, but the gem-backed client never
raised it, so Stripe errors escapedStripeService, the checkout and
portal services, andCreateLifetimeSessionService. Hosts that rescued
Stripe::*errors from these services should rescue
Billing::GatewayErrorinstead.- The webhook endpoint answers
400(not500) to a signed v2 thin event;
stripe-ruby 19'sStripe::Webhook.construct_eventraisesArgumentError
for those. - Stripe event fixtures under
spec/fixtures/stripe/use the dahlia shapes
and carryapi_version.
- New
- Dependencies: Ruby 4.0.7 (repo, CI, and the generated host's
.ruby-version/ Dockerfile default), Rails 8.1.4, RuboCop 1.91 (+
rubocop-rails 2.38, rubocop-performance 1.27), SimpleCov 1.3, brakeman
8.0.6, sqlite3 2.9.6, yard 0.9.45, and the docs-site on Astro 7.3 / Starlight 0.42. Patches the
websocket-driver 0.8.0 advisories (CVE-2026-54463/54464/54465/61666)
and the docs-site devalue, nanoid, and postcss advisories. CI moves to
actions/setup-node@v7. - Documentation:
doc/is now organised into Diátaxis folders —
tutorials/,how-to/,reference/,design-system/,
explanation/, plusinternal/for maintainer-facing working
documents. Published URLs on the docs site are unchanged (the site
flattens the folders), and the site's in-page cross-links — which
previously shipped as raw.mdhrefs and 404'd — now resolve to the
real page URLs. - Engine generator: ApplicationController now requires authentication by default. Opt out via
skip_before_action :authenticate_identity!in controllers serving public flows. [BREAKING for hosts that explicitly relied on engines being unauthenticated by default.] - Notifications generator: preferences controller now uses an explicit
permit list from the channel/type registry rather thanpermit!.
Eliminates the brakeman mass-assignment warning shipped with generated
engines. Hosts that have already ejected
app/controllers/notifications/preferences_controller.rbwill not
re-generate it (per thetemplate_unless_ejectedcontract); to pick
up the new behaviour, replace
params.require(:preferences).permit!in the ejected copy with
params.require(:preferences).permit(*Notifications::Preferences.allowed_keys)
and requirenotifications/preferencesfrom
lib/notifications.rb. - Teams generator:
TeamsControllernow includesTeams::Authorizationand appliesrequire_team_member!as abefore_actiononshow, andrequire_team_admin!onedit,update, anddestroy. Previously those actions had no resource-level membership guard, letting any authenticated identity act on any team by ID. Therequire_team_member!andrequire_team_admin!predicates in the concern now redirect toteams_pathwith an alert rather than returning a bare 403, matching the convention used by the other team controllers.
Fixed
-
Admin engine UI: the sidebar and every New / show / edit / destroy link
were missing, because Administrate reads the host's routes and a mounted
engine's routes are not in them.existing_action?and a navigation
partial now read the engine's routes;authorized_action?uses the
policy of the resource being linked. An_index_headeroverride builds
the New link from the controller. Creates now write an admin audit row
(Administrate'screatenever setrequested_resource). The admin
README documents the authenticator and membership resolver that tenant
mode needs. -
bin/audit(the pre-push gate) failed from a linked git worktree:
the hook's exportedGIT_DIRmadebundle-audit --updatepull its
advisory database against this repo. It now clears git's hook
variables for that command. -
gemspec:
required_ruby_versionis now>= 3.3.0(was>= 4.0.0), so
bundle add seamsresolves on Ruby 3.3 and 3.4 hosts. CI runs the spec
suite on 3.3, 3.4, and 4.0. RuboCop targets 3.3 so 4.0-only syntax is
caught. Ruby 3.2 is end-of-life and SimpleCov 1.x requires 3.3.
Fixes #79. -
host_inject_gemdropped every version requirement after the first, so
a range like(">= 7.1", "< 9")was written as">= 7.1"only. -
Admin generator: the host no longer gets
mount Admin::Engineand an
Admin.configureinitializer stub from the base engine step. The engine
lives atSeams::Admin::Engine, so every host that ranseams:admin
raisedNameErroron boot.seams:enginegains--skip-host-wiring
for canonical generators that wire the host themselves. The admin engine
now runs in the rails-new integration suite. -
Admin engine: every dashboard request failed. Fixed the chain found by
driving a generated host over HTTP:- routes point at
/admin/...controllers (isolate_namespace resolved
admin/identitiestoSeams::Admin::Admin::IdentitiesController) and
sit inscope as: :adminso Administrate'sadmin_*helpers exist; - the base controller includes
Auth::Authentication, so
current_identityresolves; signed-out visitors are redirected to
sign-in, non-staff get 403; - policies resolve as
Admin::<Platform|Tenant>::<Resource>Policyvia
Pundit'spolicy_class:(the array lookup produced
Module::Auth::IdentityPolicy); - dashboards declare
self.model; association fields take a
dashboard:option (Admin::Fields::BelongsTo/HasMany); - the
Admin::*controllers get the engine's route helpers, the
accounts/teamsmembership route-key clash is dispatched by record
class, flash messages use the real model name, andverify_authorized
no longer names a non-action (ActionNotFound on Rails 7.1+); - the admin dummy app registers the abilities its tenant policies
check, and the tenant role specs use a concrete policy.
The integration suite signs in as anonymous, non-staff, and staff and
asserts every dashboard's index and new page plus a create.
- routes point at
-
Generated
bin/docker-entrypointnow runsdb:preparefor the
Dockerfile's ownbundle exec rails server -b 0.0.0.0command. It only
checked the first three arguments, whereservernever appears, so a
seams-built container started against an empty database. Verified by
building and running a generated host (all engines) against Postgres 18. -
Engine dummy apps now ship
spec/dummy/config/cable.yml(test adapter).
solid_cable 4.1 readsconfig_for("cable")at boot, so every generated
engine spec suite failed to load in a host that bundles solid_cable.
Engines generated before this release need the file added by hand:
engines/*/spec/dummy/config/cable.ymlcontainingtest:/
adapter: test. -
Nightly link check: lychee retries each link 5 times (10s apart) before
reporting it, and a failing run updates the openbroken-linkissue
instead of filing a new one. Closes #93 and #109, both transient
connection resets on contributor-covenant.org. -
Teams generator:
InvitationsController#acceptnow redirects unauthenticated requests to the sign-in path (stashing the token in the session underpending_invitation_token) instead of raisingActiveRecord::RecordInvalid. The host's sign-in flow is responsible for readingreturn_toand redirecting back after authentication. -
Teams generator:
InvitationsController#acceptnow verifies that the signed-in identity's email matches the invitation email (case-insensitively) before creating the membership. Previously any authenticated identity holding a valid token could accept the invitation under a different account. -
Billing generator:
scoped_invoices/scoped_subscriptionsnow return
.nonewhen the current customer ref is nil. The previous behaviour was
an information disclosure: Rails translates
.where(customer_ref: nil)toWHERE customer_ref IS NULL, which
matches every invoice and subscription row whosecustomer_refhas not
yet been linked to a Stripe customer — typically including manual,
draft, or test records seeded by other staff. The fix returns an empty
relation when there is no customer to scope by.Hosts that have already ejected
app/controllers/billing/invoices_controller.rbor
subscriptions_controller.rbwill not re-generate them (per the
template_unless_ejectedcontract). To pick up the fix, prepend each
scope helper with:return Billing::Invoice.none if current_billing_customer_ref.nil?(likewise
Billing::Subscription.nonein the subscriptions helper)
before the existing.where(customer_ref: …)line.