docs: commands and consoles for rootfs apps; fix the Rails guide
The Rails guide said carlos run does not reach rootfs instances yet, which stopped being true with rootfs Plan 6 (v0.33.4). The Rootfs page gains a Commands and consoles section with Rails, Laravel and Django examples, and the Rails guide points to it. Copy RFS-4-C148 to C154 approved by Paul 2026-11-06; RFS-4-C100 struck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from rails-guide-run-console into main.
4 files changed,
+53
−7
approved_rootfs_copy_test.go+9 −3docs/site/rails.md+5 −1docs/site/rootfs.md+24 −0docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md+15 −3
CI passed — run details
diff --git a/approved_rootfs_copy_test.go b/approved_rootfs_copy_test.go| index f63bcfbc3..c6d3843a3 100644 |
| --- a/approved_rootfs_copy_test.go |
| +++ b/approved_rootfs_copy_test.go |
| @@ -96,6 +96,7 @@ var rootfsCopyIDs = []string{ |
| "RFS-4-C89", "RFS-4-C90", "RFS-4-C91", "RFS-4-C92", |
| "RFS-4-C93", "RFS-4-C94", "RFS-4-C95", "RFS-4-C96", |
| "RFS-4-C97", "RFS-4-C98", "RFS-4-C99", "RFS-4-C100", |
| + "RFS-4-C148", "RFS-4-C149", "RFS-4-C150", "RFS-4-C151", "RFS-4-C152", "RFS-4-C153", "RFS-4-C154", |
| "RFS-4-C101", "RFS-4-C102", "RFS-4-C103", "RFS-4-C104", |
| "RFS-4-C105", "RFS-4-C106", "RFS-4-C107", "RFS-4-C108", |
| "RFS-4-C109", "RFS-4-C110", "RFS-4-C111", "RFS-4-C112", |
| @@ -155,9 +156,11 @@ var rootfsCopyIDs = []string{ |
| // 4.4): Paul's Task 13 ruling refuses every rootfs place with RFS-3-C24, so |
| // the plan's own place refusal was never built. RFS-3-C28 by Plan 6 Task 16 |
| // (2026-10-31): runs reach fleet boxes over the console's run door (ruling |
| -// R7), and RFS-6-C62 says so; it was never built. RFS-1-C15 is live until |
| +// R7), and RFS-6-C62 says so; it was never built. RFS-4-C100 on 2026-11-06 |
| +// (rails-guide-run-console): Plan 6 brought carlos run to rootfs rows, and |
| +// RFS-4-C148 to C154 replace it. RFS-1-C15 is live until |
| // Plan 5 Task 2a strikes it. |
| -var rootfsCopyStruck = []string{"RFS-3-C13", "RFS-3-C25", "RFS-3-C28", "RFS-4-C03", "RFS-4-C04"} |
| +var rootfsCopyStruck = []string{"RFS-3-C13", "RFS-3-C25", "RFS-3-C28", "RFS-4-C03", "RFS-4-C04", "RFS-4-C100"} |
| // rootfsCopyStatuses are the statuses the deck may carry. struck is the |
| // rootfs deck's own: a struck row is never reviewed, never built and never |
| @@ -251,12 +254,15 @@ var rootfsCopyBuilt = []string{ |
| "RFS-4-C141", "RFS-4-C142", "RFS-4-C143", "RFS-4-C144", "RFS-4-C146", |
| // rootfs-default-home (2026-11-01): HOME is /tmp unless set (docs/site/rootfs.md) |
| "RFS-4-C147", |
| + // rails-guide-run-console (2026-11-06): Commands and consoles on the |
| + // Rootfs page and the Rails guide's pointer; RFS-4-C100 struck |
| + "RFS-4-C148", "RFS-4-C149", "RFS-4-C150", "RFS-4-C151", "RFS-4-C152", "RFS-4-C153", "RFS-4-C154", |
| // Plan 4 Task 9: the Rails guide, the Laravel and Django notes, and the Guides nav (docs/site/rails.md, laravel-and-django.md, nav.json) |
| "RFS-4-C63", "RFS-4-C64", "RFS-4-C65", "RFS-4-C66", "RFS-4-C67", "RFS-4-C68", "RFS-4-C69", "RFS-4-C70", |
| "RFS-4-C71", "RFS-4-C72", "RFS-4-C73", "RFS-4-C74", "RFS-4-C75", "RFS-4-C76", "RFS-4-C77", "RFS-4-C78", |
| "RFS-4-C79", "RFS-4-C80", "RFS-4-C81", "RFS-4-C82", "RFS-4-C83", "RFS-4-C84", "RFS-4-C85", "RFS-4-C86", |
| "RFS-4-C87", "RFS-4-C88", "RFS-4-C89", "RFS-4-C90", "RFS-4-C91", "RFS-4-C92", "RFS-4-C93", "RFS-4-C94", |
| - "RFS-4-C95", "RFS-4-C96", "RFS-4-C97", "RFS-4-C98", "RFS-4-C99", "RFS-4-C100", "RFS-4-C101", "RFS-4-C102", |
| + "RFS-4-C95", "RFS-4-C96", "RFS-4-C97", "RFS-4-C98", "RFS-4-C99", "RFS-4-C101", "RFS-4-C102", |
| "RFS-4-C103", "RFS-4-C104", "RFS-4-C105", "RFS-4-C106", "RFS-4-C107", "RFS-4-C108", "RFS-4-C109", "RFS-4-C110", |
| "RFS-4-C111", "RFS-4-C112", "RFS-4-C113", "RFS-4-C114", "RFS-4-C115", "RFS-4-C116", "RFS-4-C117", "RFS-4-C118", |
| "RFS-4-C119", "RFS-4-C120", "RFS-4-C121", "RFS-4-C122", "RFS-4-C123", "RFS-4-C124", "RFS-4-C125", "RFS-4-C126", |
diff --git a/docs/site/rails.md b/docs/site/rails.md| index 7fc012a96..9a53ffa1e 100644 |
| --- a/docs/site/rails.md |
| +++ b/docs/site/rails.md |
| @@ -188,7 +188,11 @@ carlos logs --app shop -f |
| If `carlos secrets set` or `carlos store create` says the fleet has no secrets key, register it with `carlos fleets secrets-key <fleet> <pubkey>` and run the command again. If `carlos instances list` shows a config refusal, its REASON column says what to do. |
| -carlos run does not reach rootfs instances yet. |
| +To run a rake task or open a Rails console on an instance, see [Commands and consoles](/docs/rootfs#commands-and-consoles). |
| + |
| +```sh |
| +carlos run --app shop --instance shop.k3x.example.com -- bin/rails db:seed |
| +``` |
| ## Deploys and migrations |
diff --git a/docs/site/rootfs.md b/docs/site/rootfs.md| index 68f93e32e..b23704779 100644 |
| --- a/docs/site/rootfs.md |
| +++ b/docs/site/rootfs.md |
| @@ -73,6 +73,30 @@ carlos ship --check warns when a process runs Node, Bun or Deno and the release |
| An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service. |
| +## Commands and consoles |
| + |
| +carlos run runs a one-off command on an instance: a data fix, a rake task, an artisan or manage.py command. It runs inside the instance's image, in web's working_dir, with web's environment and the same database. Its output comes back to your terminal, and carlos exits with the command's own status. |
| + |
| +```sh |
| +carlos run --app shop --instance shop.example.com -- bin/rails db:seed |
| +carlos run --app shop --instance shop.example.com -- php artisan cache:clear |
| +carlos run --app shop --instance shop.example.com -- python manage.py clearsessions |
| +``` |
| + |
| +A command with a slash in it, like bin/rails, is found from web's working_dir. A bare name, like php, is found along the image's PATH. Commands are not run through a shell, so for a pipe or a variable, run sh -c with the line in quotes. |
| + |
| +A console runs the same way, in a terminal session. Sessions are off until an owner turns them on for the app. Then carlos console starts the app's console process, and carlos run -it starts any other command, such as a shell. |
| + |
| +```sh |
| +carlos apps set shop --interactive on |
| +carlos console --app shop --instance shop.example.com |
| +carlos run -it --app shop --instance shop.example.com -- sh |
| +``` |
| + |
| +carlos ship fills in console when a release declares none: bin/rails console for Rails, php artisan tinker for Laravel and python manage.py shell for Django. Any other app declares its own in processes.json. |
| + |
| +A session can read and change everything the instance can. It ends after 30 minutes without a keystroke, and a deploy or a restart ends it too. [carlos run](/docs/cli#carlos-run) has the limits, the exit statuses and how to run commands from CI. |
| + |
| ## Deployments run for one customer |
| A deployment whose boxes all belong to one customer says so with CARLOS_DEPLOYMENT_SINGLE_TENANT=1, in the console's environment and in every box's host.env. A rootfs app can then run on any of its boxes, not only on a fleet. Leave it unset on a deployment that runs apps for other people. The console does not start if the value is anything but 0 or 1. |
diff --git a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md| index 581921a4e..a70db34f1 100644 |
| --- a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md |
| +++ b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md |
| @@ -300,6 +300,12 @@ From the plan: Placeholders: `<app>` an app; `<fleet>` a fleet name; `<region>` |
| | RFS-4-C55 | docs/site/rootfs.md (fact, R11) | Memory is never writable and executable at once, unless the release is shipped with carlos ship --jit. A JIT compiler needs that: Node, Bun and Deno, the JVM, Ruby's YJIT and PHP's opcache JIT. Ruby, PHP and Python run well without one. | approved | |
| | RFS-4-C56 | docs/site/rootfs.md | Network | approved | |
| | RFS-4-C57 | docs/site/rootfs.md | An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service. | approved | |
| +| RFS-4-C148 | docs/site/rootfs.md (rails-guide-run-console) | Commands and consoles | approved | |
| +| RFS-4-C149 | docs/site/rootfs.md (rails-guide-run-console) | carlos run runs a one-off command on an instance: a data fix, a rake task, an artisan or manage.py command. It runs inside the instance's image, in web's working_dir, with web's environment and the same database. Its output comes back to your terminal, and carlos exits with the command's own status. | approved | |
| +| RFS-4-C150 | docs/site/rootfs.md (rails-guide-run-console) | A command with a slash in it, like bin/rails, is found from web's working_dir. A bare name, like php, is found along the image's PATH. Commands are not run through a shell, so for a pipe or a variable, run sh -c with the line in quotes. | approved | |
| +| RFS-4-C151 | docs/site/rootfs.md (rails-guide-run-console) | A console runs the same way, in a terminal session. Sessions are off until an owner turns them on for the app. Then carlos console starts the app's console process, and carlos run -it starts any other command, such as a shell. | approved | |
| +| RFS-4-C152 | docs/site/rootfs.md (rails-guide-run-console) | carlos ship fills in console when a release declares none: bin/rails console for Rails, php artisan tinker for Laravel and python manage.py shell for Django. Any other app declares its own in processes.json. | approved | |
| +| RFS-4-C153 | docs/site/rootfs.md (rails-guide-run-console) | A session can read and change everything the instance can. It ends after 30 minutes without a keystroke, and a deploy or a restart ends it too. [carlos run](/docs/cli#carlos-run) has the limits, the exit statuses and how to run commands from CI. | approved | |
| | RFS-4-C58 | docs/site/rootfs.md | Deployments run for one customer | approved | |
| | RFS-4-C59 | docs/site/rootfs.md | A deployment whose boxes all belong to one customer says so with CARLOS_DEPLOYMENT_SINGLE_TENANT=1, in the console's environment and in every box's host.env. A rootfs app can then run on any of its boxes, not only on a fleet. Leave it unset on a deployment that runs apps for other people. The console does not start if the value is anything but 0 or 1. | approved | |
| | RFS-4-C60 | docs/site/rootfs.md | Dedicated pools do not count as a customer's own boxes yet, because nothing ties a pool to one account. On a deployment that runs apps for other people, a rootfs app cannot run in one. | approved | |
| @@ -347,7 +353,8 @@ From the plan: Placeholders: `<app>` an app; `<fleet>` a fleet name; `<region>` |
| | RFS-4-C97 | docs/site/rails.md | Create the app on your fleet, give it instances, a bucket and a secret key base. Then ship the image, promote it, and create the instance. | approved | |
| | RFS-4-C98 | docs/site/rails.md | Ship before you create the instance. An app's first release makes it a rootfs app, and an instance takes that, and whether it hibernates, from the release when it is created. | approved | |
| | RFS-4-C99 | docs/site/rails.md | The first start runs release, which migrates the empty database, then starts web, then the worker once web answers. carlos instances list shows the instance's runtime and its workers, and carlos logs shows all three processes. | approved | |
| -| RFS-4-C100 | docs/site/rails.md (fact, D8) | carlos run does not reach rootfs instances yet. | approved | |
| +| RFS-4-C100 | docs/site/rails.md (fact, D8; struck 2026-11-06: Plan 6 brought carlos run and sessions to rootfs instances, and RFS-4-C154 replaces it) | carlos run does not reach rootfs instances yet. | struck | |
| +| RFS-4-C154 | docs/site/rails.md (rails-guide-run-console) | To run a rake task or open a Rails console on an instance, see [Commands and consoles](/docs/rootfs#commands-and-consoles). | approved | |
| | RFS-4-C101 | docs/site/rails.md | Deploys and migrations | approved | |
| | RFS-4-C102 | docs/site/rails.md | A deploy starts the new web beside the old one and moves traffic once the new one answers. release runs first, from the new image, while the old version is still serving. So a migration has to work with the code that is already running: add a column, deploy, use it, and remove the old one in a later deploy. | approved | |
| | RFS-4-C103 | docs/site/rails.md | When a migration cannot work that way, ship that release with --swap hold. The old version stops, release runs, and the new version starts. Requests wait for a few seconds while that happens. | approved | |
| @@ -593,6 +600,11 @@ were struck by the Plan 4 pre-flight (row 4.4). |
| RFS-1-C15 is live until Plan 5 Task 2a strikes it (Astra R2 finding 5). |
| RFS-3-C28 was struck on 2026-10-31 by Plan 6 Task 16 (runs reach fleet |
| boxes, ruling R7); it was never built. |
| +RFS-4-C100 was struck on 2026-11-06 (rails-guide-run-console): Plan 6 |
| +brought carlos run and terminal sessions to rootfs instances, so the line |
| +was wrong. RFS-4-C148 to C154 replace it with a Commands and consoles |
| +section on the Rootfs page and a pointer in the Rails guide; Paul approved |
| +all seven unchanged in his copy review on 2026-11-06. |
| Recounted from the rows on 2026-10-30 (Plan 6 amendment, Astra R1 P2-7); |
| the earlier counts had not followed Plans 1 and 4's later rows. |
| @@ -600,7 +612,7 @@ the earlier counts had not followed Plans 1 and 4's later rows. |
| - Plan 1: 99 live, 0 struck, 99 rows |
| - Plan 2: 12 live, 0 struck, 12 rows |
| - Plan 3: 32 live, 3 struck, 35 rows |
| -- Plan 4: 144 live, 2 struck, 146 rows |
| +- Plan 4: 150 live, 3 struck, 153 rows (RFS-4-C100 struck and RFS-4-C148 to C154 added on 2026-11-06) |
| - Plan 5: 44 live, 0 struck, 44 rows |
| - Plan 6: 75 live, 0 struck, 75 rows (RFS-6-C47 revised and RFS-6-C65 added and approved on 2026-10-30; RFS-6-C66 to C75 added and approved on 2026-10-31) |
| -- Total: 406 live, 5 struck, 411 rows |
| +- Total: 412 live, 6 struck, 418 rows |