| new file mode 100644 |
| index 000000000..b248786fc |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-10-22-db-region-forward-copy.md |
| @@ -0,0 +1,69 @@ |
| +# `carlos db` region forward: copy record |
| + |
| +Every user-facing string the db region forward plans write (spec |
| +`2026-10-22-db-region-forward-design.md` §10): console refusals, the CLI's |
| +sentences, the audit details and the docs prose. The gate is |
| +`approved_db_forward_copy_test.go` at the repo root. It reuses the moves |
| +gate's parser, so the format is the moves record's: one table per heading, |
| +columns id, file, text, status. |
| + |
| +The rules: |
| + |
| +- A row is `pending` until Paul approves it in the copy review (the |
| + `copy-review` skill). His edits are applied to the text here verbatim and |
| + the row becomes `approved`. |
| +- No pending string reaches code or docs. The task that writes a row's |
| + text adds its id to `dbForwardCopyBuilt` in the gate in the same commit, |
| + and from then on the gate fails unless the row is `approved` and its |
| + text is in the file it names. |
| +- In a Go file the text is one string literal, or one `fmt.Sprintf`, |
| + `fmt.Errorf` or `errors.New` format, equal to the row with a format verb |
| + where the row has a `<placeholder>`. No trailing newline inside the |
| + literal. |
| +- A table cell holds one line, so a row's text writes a paragraph break as |
| + `\n\n`. In `docs/site/cli.md` each paragraph of a row is one line. |
| +- No em dashes. A full stop and a new sentence instead, continuing in lower |
| + case. Docs prose keeps the CLI page's sentence case. |
| +- Ids are not renumbered. DBF-17 to DBF-20 and DBF-23 to DBF-29 are kept |
| + for plan 3's pull rows. |
| + |
| +Placeholders: `<host>` the instance's hostname; `<region>` a placement code |
| +such as uk; `<size>` and `<cap>` byte sizes as the CLI prints them; `<n>` a |
| +count of bytes; `<sha>` the first 16 hex digits of a SHA-256; `<time>` an |
| +RFC 3339 time. |
| + |
| +## Console (plan 2) |
| + |
| +| id | file | text | status | |
| +|---|---|---|---| |
| +| DBF-1 | internal/console/apidbforward.go | <host> keeps its data in region <region>. no server in that region can read databases yet, so carlos db cannot read it for now. | pending | |
| +| DBF-2 | internal/console/apidbforward.go | <host> keeps its data in region <region>. no server in that region is answering right now. try again in a few minutes. | pending | |
| +| DBF-9 | internal/console/apidbforward.go | too many database reads are open. wait a minute and try again. | pending | |
| +| DBF-10 | internal/console/apidbforward.go | <host> is moving between regions. read its database once the move has finished. | pending | |
| +| DBF-14 | internal/console/apidbforward.go | <host> keeps its data in region <region>. this version of carlos cannot read it from there. run carlos update, then try again. | pending | |
| +| DBF-21 | internal/console/apidbforward.go | forwarded a database query to region <region>. the query was <n> bytes, sha256 <sha> (cli) | pending | |
| +| DBF-22 | internal/console/apidbforward.go | forwarded a database query to region <region>, as of <time>. the query was <n> bytes, sha256 <sha> (cli) | pending | |
| + |
| +## CLI (plan 2) |
| + |
| +| id | file | text | status | |
| +|---|---|---|---| |
| +| DBF-3 | dbforward.go | no server in region <region> picked up the read within 60 seconds. try again in a few minutes. | pending | |
| +| DBF-4 | dbforward.go | <host>'s database is <size> once restored. carlos db can query at most <cap> in region <region>. | pending | |
| +| DBF-5 | dbforward.go | the server in region <region> does not have room to restore <host>'s database right now. try again later. | pending | |
| +| DBF-6 | dbforward.go | the result was cut off at 64 MB. narrow the query with WHERE or LIMIT and run it again. | pending | |
| +| DBF-7 | dbforward.go | the query ran for 5 minutes and was stopped. narrow it and run it again. | pending | |
| +| DBF-8 | dbforward.go | <host> keeps its data in region <region>. carlos db pull cannot fetch a copy from there yet. carlos db query can read it. | pending | |
| +| DBF-11 | dbforward.go | reading a copy of <host>'s database in region <region>. | pending | |
| +| DBF-12 | dbforward.go | the read of <host>'s database in region <region> did not finish, so nothing was printed. try again. | pending | |
| +| DBF-13 | dbforward.go | the answer from region <region> did not check out, so carlos db showed none of it. try again. | pending | |
| +| DBF-15 | dbforward.go | <host> changed while the read was waiting. try again. | pending | |
| +| DBF-16 | dbforward.go | <host> is moving between regions. read its database once the move has finished. | pending | |
| +| DBF-32 | dbforward.go | this query cannot be sent to region <region>, because it holds bytes that are not UTF-8 text or the character U+FFFD. fix the query and run it again. | pending | |
| + |
| +## Docs |
| + |
| +| id | file | text | status | |
| +|---|---|---|---| |
| +| DBF-30 | docs/site/cli.md | If the app has more than one instance, name one with `--instance`. Only instances that sleep have a replica. An instance on your own fleet or in a pool cannot be read this way, and the command says which.\n\nWhen an instance keeps its data in another region than the console's, `carlos db query` runs in that region. A server there restores the copy, runs your query and sends back only the rows. The rows are encrypted for your terminal on the way, so nothing in between can read them, and nothing is printed until all of them have arrived and checked out. There, the copy can be at most 2 GB once restored, the query runs for at most 5 minutes, and the rows can come to at most 64 MB. `carlos db pull` cannot fetch a copy from another region yet. | pending | |
| +| DBF-31 | docs/site/cli.md | carlos system db-worker runs on platform boxes only. systemd starts it for each forwarded database query. you never run it yourself. | pending | |