Commit Graph

72 Commits

Author SHA1 Message Date
Stanko K.R. d3816bc212 Create testbed to test beamer scenarios in Fizzy 2025-10-13 13:46:00 +02:00
Mike Dalessio 4f981e9c2f Add yabeda-actioncable metrics 2025-10-11 13:35:31 -04:00
Mike Dalessio fb45b9d366 Install Autotuner for GC recommendations 2025-10-10 15:49:48 -04:00
Jorge Manrubia 59db345484 Don't lose existing values in case they had been set 2025-10-07 09:42:25 +02:00
Mike Dalessio 320558919c Rename LOCAL_AUTHENTICATION to OSS_CONFIG 2025-10-02 16:44:24 -04:00
Mike Dalessio 1a97cd300e Add a few more Yabeda modules 2025-09-23 17:15:52 -04:00
Mike Dalessio f01e20f64b Introduce yabeda for puma metrics 2025-09-15 12:08:43 -04:00
Mike Dalessio 4442964408 Introduce yabeda for Solid Queue metrics 2025-09-15 11:05:04 -04:00
Mike Dalessio 2630e4bd74 Extract 37id and QB controllers, models, and tests 2025-09-13 16:03:02 -04:00
Mike Dalessio 66075fc49e Extract signal_id and queenbee initialization 2025-09-13 16:03:00 -04:00
Mike Dalessio 8f39c015ea Tests now pass with local authentication
This is the first step of a multi-step SaaS engine extraction.

Looking ahead to an open source release, we need to make sure that
local authentication is treated as an "official" option, and not just
a hack I added for Kevin to do load testing outside our DC. So this PR
gets to green, and adds a CI step in "local authentication" mode.

This all probably feels a little hacky to you, Reader, but the goal of
this change is to ease the next step, which will be extracting the
37id and Queenbee integrations into a proprietary "SaaS mode" engine.

In service of that goal, this commit simply wraps all of the dependent
code and tests with a conditional check on
`config.x.local_authentication`.
2025-09-13 15:21:00 -04:00
Stanko K.R. 6b89aa6805 Improve naming & remove money accessors 2025-08-25 10:30:43 +02:00
Jorge Manrubia 588f03e927 Remove insight experimental code
Also, downgrade LLM for commands to mini. It's much cheaper and I only upgraded because of the
interpretation complexities that the insight command introduced.

We are implementing a much better approach with Ask.
2025-08-11 13:40:56 +02:00
Mike Dalessio 5540b0fd1b Make sure session cookie has the correct path for the tenant
ref: https://fizzy.37signals.com/5986089/collections/7/cards/1234
2025-08-10 18:53:52 -04:00
Mike Dalessio 58ce8828fa Well, well, well, if it isn't the consequences of my own actions 2025-08-08 14:18:08 -04:00
Mike Dalessio 6bf61b631e Ensure sanitizer config applies to ActionText in production
In production, eager loading prevents the default sanitizer config
from applying to Action Text. Let's explicitly set it.

ref: https://fizzy.37signals.com/5986089/collections/2/cards/1123
2025-08-08 13:50:23 -04:00
Mike Dalessio 57269b1b9c Allow local authentication with LOCAL_AUTHENTICATION=1
You can touch `tmp/local-auth.txt` to persist this setting.
2025-08-06 17:05:35 -04:00
Jorge Manrubia 83d743fe2a Make the translator use the /insight command 2025-07-24 16:48:02 +02:00
Jason Zimdars 0afc738d19 Whitespace 2025-07-21 20:11:03 -05:00
Jason Zimdars a6e9e51071 Merge branch 'main' into web-push
* main: (28 commits)
  Clean up the /scripts directory
  Prevent recursion when invoking AI
  Bump sqlite3 from 2.7.2 to 2.7.3
  Port over Jeremy's fix for slow uploads
  .gitignore log files and portfolio's local storage
  Drop Current.account and just use Account.sole
  Use the utf8-patched mysql driver
  Call blob.preview for previewable attachments
  Make sure the image variants we use are preprocessed
  Add /user command
  Make sure it doesn't infer custom abbreviations when matching user names
  Script to load prod db in development
  Update Signup to use the queenbee_id for the tenant name
  Bump cache version
  Make sure it uses latest bundler to prevent error due to mismatch
  Invalidate cache
  Update ruby
  Update bundler to prevent error on lower version
  Update bundler to prevent error on lower version
  Resolve stages
  ...
2025-07-21 11:03:56 -05:00
Mike Dalessio ef6198d394 Make sure the image variants we use are preprocessed
to avoid implicitly creating a variant during a GET to a read replica,
which will raise an exception and cause the image to fail to load.

This feels pretty brittle, to be honest, and we'll need to be careful
in the future about creating and using new variants; we will probably
need to backfill the new variant for existing images because we can't
guarantee that they will be created implicitly/lazily if the GET lands
on the replica.

ref: https://fizzy.37signals.com/5986089/collections/7/cards/942
2025-07-18 15:43:31 -04:00
Jorge Manrubia 61dc39d158 Use mini which works much better 2025-07-18 05:11:19 +02:00
Jason Zimdars e59a994a0c Add db table and models 2025-07-14 19:57:30 -05:00
Mike Dalessio 05984845ca Change Active Storage account slug extension to a to_prepare block
because it was breaking in development after a reload.
2025-07-03 19:01:03 -04:00
Mike Dalessio da69bd1689 Remove local authentication code 2025-07-02 11:59:21 -04:00
Mike Dalessio 7089fbe0d4 Configure Mission Control to skip tenanted authentication
In 29644ba1 we configured HTTP basic auth to secure it for now.
2025-07-01 15:56:14 -04:00
Mike Dalessio 3844dc9ff3 Patch Active Storage controllers to generate slugged URLs
This really only impacts the Disk service in development.

I proposed this upstream in https://github.com/rails/rails/pull/55248,
but it's not clear if the presence of script_name should _always_
prefix generated URLs, so for now it's local to Fizzy.
2025-07-01 15:56:14 -04:00
Mike Dalessio e378c5a45e Extract pieces from the tenanting initializer
into:

- tenanting/account_slug
- tenanting/logging
- tenanting/turbo
2025-07-01 15:56:14 -04:00
Mike Dalessio e68e2eb971 Patch Turbo to use the request script name
so that the URLs generated during view rendering are correct
2025-07-01 15:56:14 -04:00
Mike Dalessio f43a5ff22c Use a tenant resolver that recognizes the account slug
and sets the script name accordingly
2025-07-01 15:56:14 -04:00
Mike Dalessio b2ff0b47bf Make sure QB subscriptions reload properly in dev 2025-06-25 10:06:45 -04:00
Mike Dalessio 141554c21c Make sure the beta env keeps local authentication (for now)
and more importantly, don't try to connect to the 37id database, which
will hang.

And finally, set the connect_timeout to something small so if we do
try to make a connection, it will fail quickly instead of hanging for
the default 120 seconds.
2025-06-20 16:17:02 -04:00
Mike Dalessio 8b68eab6a8 Add the shared signal_id secret
so that we can authenticate properly with launchpad
2025-06-20 15:16:57 -04:00
Mike Dalessio d29bfb9f5a Add a QB API endpoint for plans
- add the shared api token to all environments
- add a single FreeV1 subscription
- add QB routes
- allow the queenbee routes in the tenanting middleware

ref: https://3.basecamp.com/2914079/buckets/37331921/todos/8746302763
2025-06-20 15:16:57 -04:00
Mike Dalessio ee60e8dd01 Signup::AccountsController suppports signing up with a new identity 2025-06-20 15:16:57 -04:00
Mike Dalessio 73ba0c074f Introduce a Signup model and integrate with QB/37id
- Creates a Queenbee::Account
- SignalId peer classes work properly
- Set up a basic template for the account (closure reasons, workflow, collection)
- Load signal_id fixtures during `bin/setup --reset`
- Update signal_id to pull in the Fizzy product
2025-06-20 15:16:57 -04:00
Mike Dalessio aada380147 Add the signal_id gem
- add libmysqlclient to the container image
- configure the signal id database
- YAML permitted classes setup for 37id tests
- setup rw splitting so integration tests pass
2025-06-20 15:16:56 -04:00
Kevin McConnell e998783155 Use VFS-based Beamer 2025-06-05 11:59:30 +01:00
Mike Dalessio e67d59e341 Introduce a staging environment
ref: https://3.basecamp.com/2914079/buckets/21350690/card_tables/cards/8708868711
2025-06-04 11:06:09 -04:00
Mike Dalessio df682cdfe1 Make sure Sentry is configured for the beta env. 2025-05-31 13:35:53 -04:00
Mike Dalessio febab0758a Drop the unnecessary initializer creating storage paths 2025-05-30 15:13:10 -04:00
Jorge Manrubia fa04016cbe Revert "Revert "Replace House with Lexical"" 2025-05-29 14:25:16 +02:00
Jorge Manrubia 08d8b2e5ff Revert "Replace House with Lexical" 2025-05-29 14:22:27 +02:00
Jorge Manrubia 10b2aad647 Replace House with lexical-powered actiontext 2025-05-23 11:41:08 +02:00
Jorge Manrubia b8f94c4ecb Add VCR and some initial tests 2025-05-16 13:29:18 +02:00
Jorge Manrubia b079be8388 Be explicit about the model 2025-05-16 13:29:18 +02:00
Jorge Manrubia 67984bf589 WIP for LLM experiment 2025-05-16 13:29:18 +02:00
Mike Dalessio 9d8d38873e Backup the tenant databases nightly.
This is probably not a permanent solution, but should provide some
disaster recovery capability while we're building up Fizzy operationally.
2025-04-30 06:15:25 -04:00
Jason Zimdars c964c87d5b Don't strip lightbox attributes 2025-04-30 10:52:47 +02:00
Mike Dalessio 33719b588c Restore the 404 page but allow the kamal health check 2025-03-20 11:36:32 -04:00