docs, cli: corrected page cache copy (EPC-4, 13, 16)
Paul approved corrected text in copy review gocfeujcz3hxn67s6dlk372b5i.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/site/cli.md+2 −2docs/superpowers/plans/2026-11-08-edge-page-cache-copy-approved-corrections.json+35 −0docs/superpowers/plans/2026-11-08-edge-page-cache-copy.md+4 −4instances_pages.go+1 −1pages_cli_test.go+1 −1
Intent
<task-notification> <task-id>a869f8f067e46afe7</task-id> <tool-use-id>toolu_01Mz3En9akJFHoabbVDtSiuN</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/d79ef2b4-4291-4945-bd45-b3f16796c4ba/tasks/a869f8f067e46afe7.output</output-file> <status>completed</status> <summary>Agent "Final-review fix wave" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: findings 1, 2, 3, 5, 6 and 7 are fixed; I left finding 4 alone because it is copy. No user-facing strings changed. Every new test failed before its fix. For the two test-only fixes in finding 5, I broke the code on purpose: the new tests failed and the old ones still passed. Commits on edge-page-cache-1 (base c08469a8): 79558e57 (F1), 66b7eace (F2), 9aba50ff (F3), c6721710 (F5a+b), a6eb2acf (F6), 6899bfab (F7), d528c0af (census re-propose). Tests: pageindex -race, edge (Page|Purge|Demo|Reload|Tunnel|Cache|Churn), assetcache Delete -race, activator, host, provision Census and registry all pass at d528c0af. The touched packages also build for darwin and windows. Concerns: - **Purge ownership (ruling R10):** purges can leave the LRU untouched while the edge's route table still shows the previous instance on a hostname. Ownership is judged in one route-table snapshot, not under the reload lock. - **Wider resets:** finding 1 now also resets pages, mark kept, when the instance's live entry is missing, has path rows or belongs to another instance. - **Finding 6 goes slightly beyond the brief:** it also drops the edge cache's process inputs for hosts with no registry row. The cost is that a recreated host stores no pages until its next spawn. - **Finding 5b:** the wiring witness reads agent.go's syntax tree, following this package's existing runAgent tests, rather than booting the agent. - **Census:** six units changed again, three are new, and four packages were re-pinned. The proposal still needs the independent cross-family census review. - **Git lock:** every commit printed an error about `.git/packed-refs.lock`, apparently held by another session. I checked that each commit and the branch ref landed, and did not touch the lock. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-page-cache-1/.superpowers/sdd/2026-11-08-edge-page-cache-plan-1-home/final-fix-report.md</result> <usage><subagent_tokens>285508</subagent_tokens><tool_uses>101</tool_uses><duration_ms>2721433</duration_ms></usage> </task-notification>
<task-notification> <task-id>br8vxwwu5</task-id> <tool-use-id>toolu_01M3qUXjiNLsCZ4EWixHyEY7</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/d79ef2b4-4291-4945-bd45-b3f16796c4ba/tasks/br8vxwwu5.output</output-file> <status>completed</status> <summary>Background command "Run Astra census round 3 review" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>b25z2f5id</task-id> <tool-use-id>toolu_01WJXRSAzDAf25FdDcGTwjor</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/d79ef2b4-4291-4945-bd45-b3f16796c4ba/tasks/b25z2f5id.output</output-file> <status>completed</status> <summary>Background command "Run scoped Astra re-review of the fix wave" completed (exit code 0)</summary> </task-notification>
diff --git a/docs/site/cli.md b/docs/site/cli.md| index 654645719..47bb82809 100644 |
| --- a/docs/site/cli.md |
| +++ b/docs/site/cli.md |
| @@ -1211,7 +1211,7 @@ Copies are kept only for visitors who send no cookies and no `Authorization` hea |
| A page is kept only when your app answers with status 200, no `Set-Cookie`, no `Vary` other than `Accept-Encoding`, an uncompressed body of at most 8 MiB, and a path outside your release's asset folders. Instances that run as `carlos-app@` systemd units are not cached yet. |
| -Clear copies with the `Carlos-Purge` header or `CARLOS_CONTROL_SOCKET`, as you would for the response cache. `*` clears one host, a path clears that path with any query, `/path?query` clears one address, and `all` clears every host of the instance, including its aliases and custom domains. Each response says what happened in a `Carlos-Cache` header, in the same words as for asset files. |
| +Clear copies with the `Carlos-Purge` header or `CARLOS_CONTROL_SOCKET`, as you would for the response cache. In the header, `*` clears one host, a path clears that path with any query, `/path?query` clears one address, and `all` clears every host of the instance, including its aliases and custom domains. On the socket, `{"path": "*"}` and `{"path": "all"}` work the same way, and any other `path` with its `query` clears exactly that one address. Each response says what happened in a `Carlos-Cache` header, in the same words as for asset files. |
| Once a page has been marked, the instance's other responses are no longer kept in the five-minute response cache, so mark every page you want cached. |
| @@ -1338,7 +1338,7 @@ carlos instances set-assets --app shop a.shop.example.com off |
| ### carlos instances set-pages |
| -Turns page caching on or off for one instance. `off` throws away the pages it keeps, and every request reaches the app, which helps while you are debugging or if a page was cached that shouldn't have been. `on` goes back to keeping the pages the app marks. Instances start with it on. |
| +Turns page caching on or off for one instance. `off` throws away the pages it keeps and stops keeping new ones, which helps while you are debugging or if a page was cached that shouldn't have been. The instance then uses the ordinary five-minute response cache again. `on` goes back to keeping the pages the app marks. Instances start with it on. |
| ```sh |
| carlos instances set-pages --app shop a.shop.example.com off |
diff --git a/docs/superpowers/plans/2026-11-08-edge-page-cache-copy-approved-corrections.json b/docs/superpowers/plans/2026-11-08-edge-page-cache-copy-approved-corrections.json| new file mode 100644 |
| index 000000000..0a8658962 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-11-08-edge-page-cache-copy-approved-corrections.json |
| @@ -0,0 +1,35 @@ |
| +{ |
| + "action": "approve", |
| + "guidance": null, |
| + "strings": [ |
| + { |
| + "id": "EPC-4", |
| + "text": "<host> will keep no copies of its pages. servers pick this up within a minute.", |
| + "original": "<host> will keep no copies of its pages. servers pick this up within a minute.", |
| + "edited": false, |
| + "rerolled": false, |
| + "rerolls": [], |
| + "done": false |
| + }, |
| + { |
| + "id": "EPC-13", |
| + "text": "Clear copies with the `Carlos-Purge` header or `CARLOS_CONTROL_SOCKET`, as you would for the response cache. In the header, `*` clears one host, a path clears that path with any query, `/path?query` clears one address, and `all` clears every host of the instance, including its aliases and custom domains. On the socket, `{\"path\": \"*\"}` and `{\"path\": \"all\"}` work the same way, and any other `path` with its `query` clears exactly that one address. Each response says what happened in a `Carlos-Cache` header, in the same words as for asset files.", |
| + "original": "Clear copies with the `Carlos-Purge` header or `CARLOS_CONTROL_SOCKET`, as you would for the response cache. In the header, `*` clears one host, a path clears that path with any query, `/path?query` clears one address, and `all` clears every host of the instance, including its aliases and custom domains. On the socket, `{\"path\": \"*\"}` and `{\"path\": \"all\"}` work the same way, and any other `path` with its `query` clears exactly that one address. Each response says what happened in a `Carlos-Cache` header, in the same words as for asset files.", |
| + "edited": false, |
| + "rerolled": false, |
| + "rerolls": [], |
| + "done": false |
| + }, |
| + { |
| + "id": "EPC-16", |
| + "text": "Turns page caching on or off for one instance. `off` throws away the pages it keeps and stops keeping new ones, which helps while you are debugging or if a page was cached that shouldn't have been. The instance then uses the ordinary five-minute response cache again. `on` goes back to keeping the pages the app marks. Instances start with it on.", |
| + "original": "Turns page caching on or off for one instance. `off` throws away the pages it keeps and stops keeping new ones, which helps while you are debugging or if a page was cached that shouldn't have been. The instance then uses the ordinary five-minute response cache again. `on` goes back to keeping the pages the app marks. Instances start with it on.", |
| + "edited": false, |
| + "rerolled": false, |
| + "rerolls": [], |
| + "done": false |
| + } |
| + ], |
| + "review": "gocfeujcz3hxn67s6dlk372b5i", |
| + "generation": 1 |
| +} |
diff --git a/docs/superpowers/plans/2026-11-08-edge-page-cache-copy.md b/docs/superpowers/plans/2026-11-08-edge-page-cache-copy.md| index 1262c311b..07ee1b348 100644 |
| --- a/docs/superpowers/plans/2026-11-08-edge-page-cache-copy.md |
| +++ b/docs/superpowers/plans/2026-11-08-edge-page-cache-copy.md |
| @@ -1,6 +1,6 @@ |
| # Edge page cache slice 1: copy record |
| -Every user-facing string plan 1 of the edge page cache writes (spec `2026-11-08-edge-page-cache-design.md` §4 and §10). Paul approved all 17 rows unchanged on 2026-11-09 in copy review `mcg5iaya3zxusb36xzhbwg3sw4` (`2026-11-08-edge-page-cache-copy-approved.json`). The gate is `approved_page_cache_copy_test.go` at the repo root, in the asset copy record's format: one table per heading, columns id, file, text, status. |
| +Every user-facing string plan 1 of the edge page cache writes (spec `2026-11-08-edge-page-cache-design.md` §4 and §10). Paul approved all 17 rows unchanged on 2026-11-09 in copy review `mcg5iaya3zxusb36xzhbwg3sw4` (`2026-11-08-edge-page-cache-copy-approved.json`). Paul approved corrections to EPC-4, EPC-13 and EPC-16 on 2026-11-09 (copy review gocfeujcz3hxn67s6dlk372b5i), after the final review found the earlier text described behaviour the code does not have. The gate is `approved_page_cache_copy_test.go` at the repo root, in the asset copy record's format: one table per heading, columns id, file, text, status. |
| The rules are the asset copy record's (`2026-10-24-edge-asset-cache-copy.md`): a row's Go text is one literal or one `fmt.Sprintf`/`fmt.Errorf`/`errors.New` format, with a verb where the row has `<host>`; docs rows are one line per paragraph in `docs/site/cli.md`; the task that writes a row adds its id to `pageCacheCopyBuilt` in the same commit. EPC-7 keeps the em dash that is already in today's help text (Paul left it). |
| @@ -16,7 +16,7 @@ The rules are the asset copy record's (`2026-10-24-edge-asset-cache-copy.md`): a |
| |---|---|---|---| |
| | EPC-2 | instances_pages.go | usage: carlos instances set-pages --app <a> [--account <a>] [--account-id <id>] [--console <origin>] <host> on\|off | approved | |
| | EPC-3 | instances_pages.go | <host> will keep copies of the pages its app marks for caching. servers pick this up within a minute. | approved | |
| -| EPC-4 | instances_pages.go | <host> will keep no copies of its pages, so every request reaches the app. servers pick this up within a minute. | approved | |
| +| EPC-4 | instances_pages.go | <host> will keep no copies of its pages. servers pick this up within a minute. | approved | |
| | EPC-5 | apimode.go | this console predates `carlos instances set-pages` (deploy a console built from current main) | approved | |
| ## CLI help |
| @@ -35,7 +35,7 @@ The rules are the asset copy record's (`2026-10-24-edge-asset-cache-copy.md`): a |
| | EPC-10 | docs/site/cli.md | Use a long `s-maxage` and `max-age=0`. The edge can clear its own copy but not the one in a visitor's browser, so `max-age=0` makes the browser check with the edge each time, and the edge answers from its copy. If a page changes at a set time, such as a post scheduled for 9:00, make `s-maxage` end then, because nothing else will tell the edge. | approved | |
| | EPC-11 | docs/site/cli.md | Copies are kept only for visitors who send no cookies and no `Authorization` header, and served only to visitors in the same position, so a signed-in page is never shared. If a cookie doesn't change the page, such as a consent cookie, name it: `Carlos-Page-Cache: on; ignore-cookies="consent"`. A visitor carrying only that cookie still gets the copy. | approved | |
| | EPC-12 | docs/site/cli.md | A page is kept only when your app answers with status 200, no `Set-Cookie`, no `Vary` other than `Accept-Encoding`, an uncompressed body of at most 8 MiB, and a path outside your release's asset folders. Instances that run as `carlos-app@` systemd units are not cached yet. | approved | |
| -| EPC-13 | docs/site/cli.md | Clear copies with the `Carlos-Purge` header or `CARLOS_CONTROL_SOCKET`, as you would for the response cache. `*` clears one host, a path clears that path with any query, `/path?query` clears one address, and `all` clears every host of the instance, including its aliases and custom domains. Each response says what happened in a `Carlos-Cache` header, in the same words as for asset files. | approved | |
| +| EPC-13 | docs/site/cli.md | Clear copies with the `Carlos-Purge` header or `CARLOS_CONTROL_SOCKET`, as you would for the response cache. In the header, `*` clears one host, a path clears that path with any query, `/path?query` clears one address, and `all` clears every host of the instance, including its aliases and custom domains. On the socket, `{"path": "*"}` and `{"path": "all"}` work the same way, and any other `path` with its `query` clears exactly that one address. Each response says what happened in a `Carlos-Cache` header, in the same words as for asset files. | approved | |
| | EPC-14 | docs/site/cli.md | Once a page has been marked, the instance's other responses are no longer kept in the five-minute response cache, so mark every page you want cached. | approved | |
| ## Docs: CLI reference |
| @@ -43,7 +43,7 @@ The rules are the asset copy record's (`2026-10-24-edge-asset-cache-copy.md`): a |
| | id | file | text | status | |
| |---|---|---|---| |
| | EPC-15 | docs/site/cli.md | carlos instances set-pages | approved | |
| -| EPC-16 | docs/site/cli.md | Turns page caching on or off for one instance. `off` throws away the pages it keeps, and every request reaches the app, which helps while you are debugging or if a page was cached that shouldn't have been. `on` goes back to keeping the pages the app marks. Instances start with it on. | approved | |
| +| EPC-16 | docs/site/cli.md | Turns page caching on or off for one instance. `off` throws away the pages it keeps and stops keeping new ones, which helps while you are debugging or if a page was cached that shouldn't have been. The instance then uses the ordinary five-minute response cache again. `on` goes back to keeping the pages the app marks. Instances start with it on. | approved | |
| ## Docs: environment table |
diff --git a/instances_pages.go b/instances_pages.go| index 31673a358..74bdc8fe7 100644 |
| --- a/instances_pages.go |
| +++ b/instances_pages.go |
| @@ -64,5 +64,5 @@ func printSetPages(w io.Writer, host string, on bool) { |
| fmt.Fprintln(w, fmt.Sprintf("%s will keep copies of the pages its app marks for caching. servers pick this up within a minute.", host)) |
| return |
| } |
| - fmt.Fprintln(w, fmt.Sprintf("%s will keep no copies of its pages, so every request reaches the app. servers pick this up within a minute.", host)) |
| + fmt.Fprintln(w, fmt.Sprintf("%s will keep no copies of its pages. servers pick this up within a minute.", host)) |
| } |
diff --git a/pages_cli_test.go b/pages_cli_test.go| index 5c26534a2..4961c1476 100644 |
| --- a/pages_cli_test.go |
| +++ b/pages_cli_test.go |
| @@ -48,7 +48,7 @@ func TestSetPagesCLI(t *testing.T) { |
| printSetPages(&b, "shop.example.com", true) |
| printSetPages(&b, "shop.example.com", false) |
| wantOut := "shop.example.com will keep copies of the pages its app marks for caching. servers pick this up within a minute.\n" + |
| - "shop.example.com will keep no copies of its pages, so every request reaches the app. servers pick this up within a minute.\n" |
| + "shop.example.com will keep no copies of its pages. servers pick this up within a minute.\n" |
| if b.String() != wantOut { |
| t.Fatalf("got\n%q\nwant\n%q", b.String(), wantOut) |
| } |