Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4fd3c12
A design for ts config migrate, with every settings change and how it…
jwrosewell Oct 17, 2026
67bae12
The audit's value-free check of a settings document is open to the co…
jwrosewell Oct 17, 2026
8152dc7
ts config migrate rewrites a settings document written for main into …
jwrosewell Oct 17, 2026
caae20b
The CLI guide and the changelog describe ts config migrate
jwrosewell Oct 17, 2026
663b01c
The config migrate design names the profile_config clash and where ne…
jwrosewell Oct 17, 2026
94234f0
ts config migrate reports [integration] on its own and a mediator once
jwrosewell Oct 17, 2026
7a39fae
The config migrate design says which checks follow a rewrite and whic…
jwrosewell Oct 17, 2026
5d3a3ee
ts config migrate takes one file and refuses --write with --check
jwrosewell Oct 17, 2026
8532143
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 18, 2026
50c68be
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 18, 2026
65bb09b
ts config migrate removes a handler only where every path it matches …
jwrosewell Oct 18, 2026
65814d5
ts config migrate reports a host header override to check
jwrosewell Oct 18, 2026
f8dffeb
ts config migrate adds page entries to a document written for main alone
jwrosewell Oct 18, 2026
4465e2a
ts config migrate takes the adapter and adds no location header
jwrosewell Oct 18, 2026
18b7c7d
ts config migrate selects the location lookup only where the host has…
jwrosewell Oct 18, 2026
6e3c092
The config migrate design, the CLI guide and the changelog take revie…
jwrosewell Oct 18, 2026
83dd4f1
ts config migrate keeps a handler with a quantifier after its prefix …
jwrosewell Oct 18, 2026
074d454
ts config migrate keeps a handler with a class or comment after its p…
jwrosewell Oct 18, 2026
eb25e6d
ts config migrate reports the region the Cloudflare lookup now reads
jwrosewell Oct 18, 2026
b6a9c1e
The config migrate design, the CLI guide and a code comment take revi…
jwrosewell Oct 18, 2026
005b11f
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 18, 2026
4f572b8
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 18, 2026
740df47
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 18, 2026
7b75f00
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 18, 2026
6f007e4
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 19, 2026
ad8f7c5
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 19, 2026
e175bf2
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 19, 2026
61f4adf
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 19, 2026
58e0134
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 19, 2026
a71edd1
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 19, 2026
ffc7c37
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
87379b5
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
e70d4b7
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
8771167
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
8f9125e
ts config migrate leaves naming the permission policy file to do
jwrosewell Oct 28, 2026
4a45296
Row 51 takes the final config migrate design
jwrosewell Oct 28, 2026
1037d85
A document written for main that names its policy migrates as main
jwrosewell Oct 28, 2026
2588ac9
The policy item's constant sits above the list sections' comment
jwrosewell Oct 28, 2026
8ff36fd
The CLI guide's staged push names the policy file
jwrosewell Oct 28, 2026
1ed0dc3
Row 51's design copy takes the reviewed config migrate design
jwrosewell Oct 28, 2026
c0502b0
The CLI guide's upgrade step names only the stored pages
jwrosewell Oct 28, 2026
2a1a354
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
e288654
Row 51's design copy says only stored pages are fetched again
jwrosewell Oct 28, 2026
de733eb
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
267029b
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
5d26aba
Row 51's design copy carries the date it is proposed, 2026-10-27
jwrosewell Oct 28, 2026
6db03a1
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
177adad
Merge split/50-cookies-by-path into split/51-config-migrate
jwrosewell Oct 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `ts config migrate --adapter <adapter> <file>` rewrites a settings document written for an earlier release, such as one written before the breaking changes above, into the shape this release reads, and prints the result. The host's location lookup the earlier release ran becomes `[geo] module = "platform"` on Fastly and Cloudflare and no geo module on Axum and Spin, which have no lookup. On stderr it lists each change it made, each setting it left for the operator because it needs a decision or a value the document does not hold, such as `[geo] assume_single_jurisdiction` for an Edge Cookie module with no geo module, and each change in behavior no setting expresses, then checks the result with the settings validation `ts config validate` runs. It keeps the comments and the order of the tables, comments out a module that was not enabled under its new name, never selects `headers.geo`, which writes the reader's location, never prints a value from the document, rewrites the file in place with `--write`, and with `--check` changes nothing and exits 1 when the document needs migrating. Migrating a migrated document changes nothing.
- A 51Degrees client hints middleware, `51degrees.client_hints`, from `crates/middleware/51degrees`, run by `[shared.51degrees]` and placed by a `[[serve]]` entry. On the Fastly adapter, the only one that runs request filters, it asks the 51Degrees service which client hints the reader's browser can send for each page navigation an entry covers, sending the `User-Agent` and `Sec-CH-UA` hints alone, and leaves the hint names in the request's state for the other 51Degrees modules, which keeps a page it names hints for out of the stored templates and sends it `private, no-store`. On each page an entry covers it writes `Accept-CH` and `Critical-CH` on the response unless the browser already sends every one of those hints, `Permissions-Policy` and the `Delegate-CH` tag that delegate those hints to the service's origin, each keeping every line the response already carries. `critical` in `[middleware.51degrees.client_hints]` turns the retry of the first navigation off. The service's answers load through the cache `51degrees-answers`, selected and sized in `[cache.51degrees-answers]`, and are held only where the build links a loading cache module, so a stock build asks the service for each page navigation an entry covers. What the 51Degrees modules share, being the table, the one call to the service, the evidence it sends and the cache its answer is held in, is the new `crates/shared/51degrees`.
- `[middleware.<name>]`, a middleware's own settings table, written with the middleware's full name and read through `Settings::middleware_config`. A table holds values and arrays, a table within one is the longer name's table and never a setting, and a table at a name no running module supplies is refused at startup with the names that could be written.
- A serve middleware may set headers on a response the publisher path sends for a request path its entry covers, through `Middleware::response_headers`, which is given the response's status and headers and runs whatever the response's media type and whether or not it has a body, so a redirect with no body reaches a middleware that rewrites its `Location`. A header it sets replaces one of the same name. The method is not called for a refusal made before the origin is asked, such as the `405` for a method a signed origin does not take, for a page served from the template cache or the refusal of such a page, or for an answer made from an error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod gpt_slots;
mod page_patterns;
mod slot_toml;
mod unit_template;
mod validate;
pub(crate) mod validate;

use std::collections::BTreeSet;
use std::fs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(super) fn check_candidate(candidate: &str, baseline: &str) -> CliResult<Vec<
/// Parse and schema errors report only a byte offset. Deploy validation errors
/// report only the failed phase because their messages can contain literal
/// values, including validator parameters and invalid patterns.
fn validate_source_config(source: &str) -> CliResult<()> {
pub(crate) fn validate_source_config(source: &str) -> CliResult<()> {
crate::app_config::register_linked_modules();
let config: TrustedServerAppConfig = toml::from_str(source).map_err(|error| {
error.span().map_or_else(
Expand Down
Loading
Loading