Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

Merge branch 'release/v0.47.0' into dev

thomashebrardaab3d5e2d04c
diff --cc CHANGELOG.md
index 4b0a32614,2d25feda9..51a698107
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -5,53 -5,9 +5,55 @@@
### Added
- **`codegen.lock` now declares its format version, so the format can grow without breaking every reader:** the lock is a cross-language interchange format — this CLI writes it, other implementations of the offline check read it — and it validated strictly with no version field at all, so the day it gained any key every consumer pinned to an older reader would have failed CI with an opaque "unknown key" error instead of a drift verdict. Each lock now opens with `lock_version = 1`; a reader refuses a version it does not know and names which side to upgrade, and it reads the version *before* the key set, so a future lock is diagnosed by its version rather than by whichever new key it happens to carry first. A lock written before the field existed is version 1 by definition and needs no migration, but every regeneration rewrites the lock once to add the key — that one-line diff is the change consumers will see. The stamp header stays deliberately unversioned, since it already ignores commented fields it does not recognise.
+ - **Line endings are pinned to LF in the git index and on checkout, on every platform:** this repo carries a lot of generated-but-committed text — `CLAUDE.md` and `AGENTS.md`, `subject_grants.toml`, the drift acks, `.test_durations`, the error-identity snapshot, the generated error pages, the migration goldens, the gateway model references — and each is produced by a writer that passes no explicit `newline`, so on Windows Python translated every `\n` to CRLF and the whole set churned in version control with no change of content. No gate would have caught it: they all compare with universal-newline reads, which fold CRLF back to LF before the comparison. A `.gitattributes` carrying `* text=auto eol=lf` closes that class for tracked files whichever writer produced them. `text=auto` leaves git to tell text from binary, so images and other binaries are untouched, and no tracked file held CRLF when this landed — it introduces no renormalisation diff, it pins the invariant. The complementary writer-by-writer fix is the structural half and is tracked separately.
+ - **Documentation:** `docs/under-the-hood/codegen-projections.md` now covers the strict stamp-header rules, the JSON conformance the `options` payload must meet, the policy for evolving the lock format under `lock_version`, and the cross-platform line-ending guarantee.
+- **A configuration that will not load now says whether it is wrong or merely old**: A validation error is raised against the merged configuration and carries no provenance — it names a key, not which file put it there, and certainly not whether that key was correct last month. When a configuration surface's model refuses, the error now also carries a dry-run scan of that surface over the same directories `pipelex migrate` walks: a structured `migration` block naming the remedy, whether that remedy would actually rewrite anything, whether anything there is a person's to resolve rather than the tool's, and the plan per file — the same shape `pipelex-agent migrate --dry-run --format json` emits, so an agent that parses one has already parsed the other. `error_domain` deliberately stays `config`: it is a closed cross-repo enum and the agent-hook specification routes anything else to BLOCK, so a stale configuration reported under a new domain would stop an agent instead of telling it what to run. Consumers branch on the block's presence — absent means the failure is not staleness — and then on `would_write`, because presence means the migration history has something to _say_ about these files and not that a command repairs them: a block whose only finding is a path no entry explains, or an entry blocked before anything applied, has nothing to run, and naming the remedy there would send a reader to a run that writes nothing and leaves the same error standing. Every surface points that reader at `pipelex migrate --dry-run` instead, where the diagnosis is. The message gains a paragraph naming the files and the next move. No value read from a user's file appears in the block, which is the third of the three channels that rule covers. A caller validating something that is not a configuration surface — a `.mthds` bundle, a model deck, a routing profile — names no surface and pays for no walk.
+
+- **Inference backend definitions are a migration surface, and the key the templating change deleted is repaired on every machine that has one**: `#1104` removed `prompting_target` from the model-spec blueprint and from every backend file we ship — but `pipelex init` never overwrites, so the key survives in `inference/backends/*.toml` on every installation that predates it, where it is fatal twice over: in `[defaults]` it is copied wholesale into every model of the file, and on a single model it is rejected by name since unknown per-model keys must be header-shaped. Those files were reachable by no surface, no walk and no gate. They are now the `inference-backend` surface, which required the walk to learn about subdirectories — a file is claimed by the pair (directory, name), one level deep, and only into a directory some configuration family owns — and required the fingerprint to record a document whose _root_ is the open node, since a backend file's root keys are model names rather than a field we could name. Boot tolerance joins at the backend loader too: a stale directory is replayed in memory, boots on the models the current files would produce, and warns once naming every file it carried. **Migration:** run `pipelex migrate` after upgrading — ledger entry `inference-backend@2` deletes `prompting_target` from every root table of every backend file, in `~/.pipelex/` and in each project `.pipelex/`, keeping one timestamped backup per file. Until you run it, each boot repeats the warning; nothing is ever written by a boot. A key _you_ added that we have never heard of is still an error rather than something the entry silently drops, and the served Pipelex Gateway specs are untouched. The one key class the report stays silent about is a per-model request header, legal by shape rather than by name — and only on a model table: `[defaults]` is copied into every model of a file unsplit, so a header put there breaks all of them, and the report names it like any other key the schema cannot explain.
+
+- **A configuration file the ledger can explain no longer stops the boot**: A schema change used to leave every machine in the field with a boot that died on `extra="forbid"`, naming a key the user never chose to have. When a configuration surface fails to validate, its ledger is now replayed over the same files **in memory** and the result validated again; a boot that succeeds says so in a warning naming the files and, for each of them the command would actually reach, the `pipelex migrate` remedy. The retry replays whatever the loader merged, so a file loaded through `Pipelex.make(config_dir=…)` from outside the two directories `migrate` walks is named instead as the caller's to update where it lives, rather than pointed at a command that would then report nothing to do. Nothing is written either way — a tolerated boot leaves the file and its directory exactly as it found them, which is why the warning keeps coming back until the command is run. Tolerance widens what starts and never what is accepted: the re-validation is what decides, so material an `unsafe` entry is about still fails the boot because the model still refuses it. Anything that goes wrong inside the retry makes it decline rather than replace the error the user already has — theirs names the key to fix. A healthy configuration pays nothing: it reads no ledger, re-parses no document, and does not even import the migration engine, which is deferred for a second reason too, since the applier lives in the interpreter layer and the configuration loaders sit in the kernel layer that must not load it. This release is where it matters most: the configuration reshape gives `pipelex.toml` its first ledger entry, so the file every boot reads is the one tolerance carries forward on every machine that upgrades.
+- **`pipelex migrate` and `pipelex-agent migrate`**: The migration engine now has commands, so a configuration that predates the installed pipelex can be repaired instead of re-initialized. Both walk the global `~/.pipelex/` and the project `.pipelex/` — those two directories only, one level deep, and into a subdirectory only when a configuration family owns it: `inference/backends/` is such a directory, `inference/deck/` is not and is never entered. A file is claimed by the pair (directory, name), which is what keeps `inference/backends/pipelex_gateway.toml` — a `pipelex_*.toml` match by name — from being rewritten under the main configuration's ledger. Neither command boots: a broken configuration is the reason to reach for them, so they use the ledger, the applier and the filesystem and nothing else, and a test hands them a configuration that cannot load to keep it that way. The human command plans, shows the plan and asks; the machine one writes only with `--yes`, since it cannot ask, and passing `--dry-run` and `--yes` together is refused rather than resolved. Its answer is structured, and `needs_attention` is the verdict — _this run left something a person has to decide_, deliberately not _did anything get written_ — with the exit code and the Markdown rendering as presentation. Every file rewritten is backed up beside itself first, and no value read from a user's file appears in either command's output or in the structured plan.
+- **A migration now names what it cannot explain about a file**: A file _newer_ than the running pipelex — an override migrated on one branch, then an older branch checked out — breaks the boot while a replay finds nothing to do, because every operation's source is absent. That silence beside a dead boot is the failure the migration project exists to remove, so every plan now carries an `unexplained[]` listing the paths of the migrated document that the current schema does not know and no ledger entry accounts for, each with the two readings the tool cannot tell apart: a typo, or a file written by a newer pipelex. This is the one part of a migration that needs the configuration model — the question goes to the surface's fingerprint, the same projection the coverage gate diffs, so the replay engine stays model-free. The document it reads is the one the run leaves behind rather than the one it found, which is what keeps every key the ledger is about to repair out of the list, and a path a _blocked_ entry is about is left to that entry, which reports it by name with its own guidance. A key the user chose is never rendered: beneath an open mapping a typo is reported at `queues.*.retries`, naming only the segment the schema does not know.
+- **A configuration file may now be refused for declaring a schema version its ledger no longer reaches**: `min_supported_schema_version` had no reader, which left the floor a comment. A migration now reads the reserved `[meta] schema_version` — exactly as tolerantly as the configuration loader strips it, so a malformed declaration is no declaration — and refuses a file below the floor by name (`unsupported_schema_version`), writing nothing. Without it, a ledger whose oldest entries had been squashed away would run over a file older than them, change nothing, and report it clean, because the applier skips an operation whose target is absent.
+
+- **An `unsafe` migration entry now says what it is about, and keeps saying it**: `unsafe` is the ledger's form for a change only a human can make, and the coverage gate's only remedy for a tightened numeric bound — but the engine decided whether to report one by rehearsing its operations, so an entry with none was accepted by the accounting and then guaranteed to reach nobody, and any entry went silent the moment a later `safe` entry renamed the table its material sat in (reported on the first run, clean on the second, boot still failing). An entry now declares the paths whose value domain narrowed, in `declared_narrowed_paths`; an entry with no operations must carry one, a `safe` entry may not, `make check-ledger` refuses a path the entry's own version does not record, and the coverage gate no longer takes the bare word `unsafe` as accounting for a narrowing or a lost enumerated spelling — it demands the path be named. The material of an `unsafe` entry is traced through the ledger before a document is questioned: back through the entry's own operations, since it never applied them, and forward through every later `safe` entry, so the same file is reported on every run for as long as it carries it. A file that merely _sets_ a narrowed path is reported under a new, weaker `value_domain_narrowed` reason listing the keys to check by hand — the engine is model-free by design and cannot tell a value the new domain refuses from one it accepts — and those keys are named at the spelling the migrated file carries rather than the one that matched, since the entry is questioned where the replay reaches it and the later `safe` entries rename the material before the file is written — and that report, alone among blocked entries, does not fail convergence, since a healthy reference document sets those paths like everyone else's file does. Forward tracing is deliberately confined to `unsafe` entries: a rehearsal may guess, an application may not.
+
+- **A migration operation can now remap every value beneath an open mapping**: `remap_value` accepts `key = "*"`, meaning "each key of the addressed table" — the same "each of these" reading the wildcard already had in a `table_path`, applied to keys. A mapping from the user's own keys to an enumerated value (`dict[str, LogLevel]`) keeps its spellings under keys only the document can enumerate, so no fixed key reaches them and this is the only shape in which a member renamed beneath one can be repaired at all. On every other kind a `*` key is now refused when the operation is parsed: deleting every key of a table is `delete_table`, and renaming or moving every key onto one fixed name is the many-to-one that already rules a wildcard out of a `move_key`. Refused rather than tolerated, because an unrefused one is a _dead_ operation that skips forever while looking like an accounting.
+
+- **A schema change that narrows what a value may _be_ is now caught, not waved through as additive**: A change can keep every path and every enumerated spelling and still break a user's file — `int` becomes `str`, a free string becomes an enum, a bound moves from `ge=1` to `ge=5`. Read as a path diff those look like additions, so the coverage gate used to ask for a golden regeneration, demand no version bump and no entry, and let the next boot reject a valid file with a green gate behind it. It now splits its verdict by _direction_: a widened type or a relaxed bound still costs only a regeneration, while a narrowing demands a bump and an entry carrying a `remap_value` for each narrowed path — or marked `unsafe`, which is the only remedy a tightened numeric bound has, since no structural operation can repair a value. The same rule applies to a stored entry, compared by origin so a narrowing hidden behind a rename is still caught, and to a `pre_history` entry, so the flag is not a way past it. To see a bound at all the fingerprint now records one: a **closed whitelist** over `gt`, `ge`, `lt`, `le`, `min_length`, `max_length` and `multiple_of`, read from `annotated_types` (now a declared dependency) and from the field metadata pydantic folds a top-level `Field(ge=1)` into, with anything unrecognized dropped rather than serialized — `pattern` excluded permanently, because regex containment is not decidable and every pattern edit would read as a tightening. One correction rides along: an enumerated type relaxed into a free string no longer reads as the loss of every spelling it had, and that is read structurally, so `list[enum]` becoming `list[str]` is the same benign loosening one container down — while a `list[enum]` flattened to a bare `str`, which is no loosening at all, still loses every spelling it had. The contract states in the same change what the gate structurally cannot see — narrowing expressed in a validator, which no projection of the annotations can reach.
+- **The telemetry configuration can now be migrated instead of thrown away, and the escape hatch that would have let it ship unverified is closed**: `telemetry.toml` carries the package's first migration entry, `telemetry-config@2`, which lifts a flat first-generation file — `telemetry_mode`, `host`, `project_api_key` and the rest at the document root — into today's `[custom_posthog]` section, keeping every value the user chose; four settings the current shape has no home for are dropped, and the entry says which and why. Because that change predates the first fingerprint, no diff describes it, and such an entry is marked `pre_history` and exempted from the coverage gate's accounting — so the verification that replaces it lands in the same change and neither ships without the other. A pre-history entry must declare the paths it removes (an empty declaration is refused when the ledger is parsed), none of those paths may appear in any fingerprint at or below its own version, the fingerprint pair it sits between must show no removal at all, and every operation must act inside the declaration. It also ships a hand-authored `[email protected]` beside the golden chain, which the transform check migrates and holds against the current shape and the current model — the same three claims every other entry answers. One comparator refinement came with it: a created path is now checked against `defaults@N` **or** `fingerprint@N`, because an optional key defaulting to `None` is a legal destination that no TOML document can carry.
+- **Configuration surfaces now have a migration ledger and a gate that forces one to be written**: Every configuration surface — `pipelex.toml` and its tiers, `telemetry.toml`, `pipelex_service.toml`, and the inference backend definitions — carries a checked-in ledger at `pipelex/migration/ledgers/<surface-id>.toml` recording, as data, every shape change it has ever undergone, plus a golden chain (`fingerprint@N`, `defaults@N`) that pins what the schema looked like at each version. Each is cut at schema version 1 with no entries; the entries this release then ships on top of that baseline are the bullets below. The new `make check-migration-schemas` (alias `cmig`, in `make check`) recomputes each surface's fingerprint and refuses a change that would break a user's file without recording how to repair it — a removed path or a lost enumerated spelling demands a version bump and an operation accounting for it, a destination the new schema does not know is refused by name, and an entry that removes a path the schema still has is refused as over-deletion. Its counterpart `make up-migration-schemas` (alias `umig`, in `make up`) regenerates the goldens; the regeneration diff is the review artifact. One standing invariant is checked whether or not anything changed: every required path must have a value in its surface's defaults layer, because that is what makes an added key absorbable rather than breaking. The contract the whole thing implements is `docs/migration-ledger.md`.
+- **The migration operation vocabulary**: Fix operations became a discriminated union on `kind`, published as two subsets — every kind for the `.mthds` fix path, and the structural kinds only for ledgers, so an operation that would write a value into a user's file fails when the ledger is parsed rather than at review time. Two new kinds land with it: `move_key`, which relocates a key across tables (the whole subtree travels when the key is table-valued, and a missing destination parent is created), and `remap_value`, which rewrites a value against an explicit old-to-new mapping. A `*` segment addresses every entry of an open mapping, expanded over the keys the file actually holds. A new `CONFLICT` outcome separates "this cannot be done without choosing on your behalf" — a rename or move onto an occupied destination, or an `ensure_table` over a key holding something that is not a table — from the benign `SKIPPED` it used to hide inside; a conflicting operation writes nothing at all.
+- **`[meta] schema_version` is reserved in configuration files**: Every configuration-surface reader now tolerates and strips it. Nothing writes it — the key exists so a later release can stamp a version into a file without that being a breaking change today.
+- **`make check-ledger` (alias `cl`)**: The second migration gate, and the first one that joins `make agent-check` as well as `make check`. It asks what a ledger entry is allowed to _say_ and whether replaying it is harmless, where `check-migration-schemas` asks whether a schema change was accounted for. An operation may only act on material some schema version removed — one addressing a path the schema still has would rewrite a perfectly valid file on every run — and it may never name a concrete key beneath an open mapping, whose keys are the user's and unbounded, while the `*` segment that addresses every entry of one is legal exactly there and nowhere else. A `safe` value remap whose old spelling is still legal, or whose target is a free string where staleness cannot be proven, is refused because it would rewrite a deliberate choice; a remap to a spelling the new schema rejects is refused because every migrated file would then fail to load with the tool reporting success. A retired path, or a remapped-away spelling, may never come back. Finally, replaying the whole ledger over each of the surface's two reference documents — the complete packaged configuration and the sparse kit starter template, deliberately different shapes — must apply nothing, report nothing, and hand back the very bytes it was given. It reads checked-in files only and fingerprints no live model, which is what makes it safe to run in the loop agents run constantly: every failure names a file the author wrote.
+- **The migration engine**: A surface's ledger can now be replayed over a real file. The engine takes a document's text and returns the text it should now have, plus a per-file plan naming the entries that applied, the entries it would not apply, and why. Two reporting rules keep a plan from being more optimistic than the file: an entry is reported once — a conflicting operation routes the whole entry into the blocked list, carrying whichever of its operations did land — and an `unsafe` entry is rehearsed against the document first, so it stays silent on a file that does not need it rather than warning at every boot forever. Writing is transactional per file and always takes a backup: exactly one per file, named `<file>.bak.<UTC stamp>`, inheriting the source file's mode rather than the umask, written before the replacement and pruned only after it commits. A file that is unparseable, unwritable or changed during the run is reported as blocked while every sibling is migrated normally — unlike the `.mthds` fix loop, whose files only make sense together and which still commits a round all-or-nothing; both now share one set of transaction primitives. Nothing calls this from the command line yet.
+- **The transform goldens**: `make check-migration-schemas` now also _performs_ each migration it is asked to believe in. For every ledger entry it applies the entry's operations to the frozen reference document of the version before it and compares the result with the frozen document of the version after: every path the migration creates must be one the new document has, every path the two documents share must survive, and the last link's output — read the way a user's file is really read, beneath the current defaults layer — must be accepted by the current model. That closes the one defect the other two checks pass in silence: a rename whose destination is misspelled is accounted for by coverage and skipped by convergence, and then migrates every file to a key the schema rejects while the tool reports success. The comparison is deliberately one-directional in each claim, so a bump that also adds keys, edits comments, flips defaults or ships one more entry in a packaged deck stays green.
+- **Replay neutrality is now a property rather than an assertion**: The guarantee a user's machine depends on — replaying a surface's whole ledger over a file already valid at the current schema changes not one byte — is checked over generated documents, not only over the two reference documents. A reference document carries exactly one value per key, so it cannot see an operation that misbehaves on the _other_ legal spelling of an enumerated field; a sampler that reaches those spellings can. The sampler proposes each mutation from the surface's fingerprint and lets the models decide whether it lands, because schema membership is settled by validators no type projection can see: a legal enum member can still be rejected for what it requires elsewhere in the document, and a mapping typed with arbitrary string keys can still refuse a key outside a fixed set. Idempotence — replaying twice equals replaying once — and prefix coherence — a file caught halfway lands where a replay from zero lands — are checked alongside it, and each generator carries its own vacuity check, since every one of these properties is trivially true over documents nothing acts on. `hypothesis` joins the development dependencies.
+- **`pipelex doctor` reports pending configuration migrations, and `--fix` runs them**: A configuration the migration history explains now boots with a warning rather than an error — and `pipelex-agent` silences logging process-wide as its first act, so a machine consumer never learns from a boot that its configuration is stale. Asking was the only channel left and there was nothing to ask. The health report gains a **Configuration Migrations** row that is `pipelex migrate`'s own dry run: a structured `finding` (`up_to_date`, `pending`, `needs_attention`, `unavailable`), the files a migration would rewrite, and separately the files it will not repair on its own — both sets, because a drifted machine usually has some of each and a reader who heard only the first would stop with a broken file still in place. `pipelex doctor --fix` then offers to run the migration, reaching the command's own write pass rather than a second implementation of it. The row is deliberately not scoped by `--global`: it answers for a command that walks both configuration directories, and a row naming fewer files than the command touches would be a surprise write. A failure inside the scan is reported as a failure to check rather than as health, and never as an exception — an exception there would replace every row of the report with a single line.
+
+### Changed
+
+- **Breaking: where a run's bytes go is now told to the runtime, not derived from who is running (`JobMetadata.storage_scope`)**: Storage keys were built from `user_id` — `{user_id}/results/{run_id}/` for delivery, `{primary_id}/{secondary_id}/…` (always `{user_id}/{pipeline_run_id}/…`) for generated content, a flat top-level `normalized/` for inputs pulled off a `data:` URL. That ties _where the bytes live_ to _who uploaded them_, which is fine until two people share the work: the second one asks for a file the first one attached and is refused, because the only thing standing between them is a string comparison on the first path segment. A host that serves teams cannot express "these two people may read the same file" in that layout at all.
+
+ `JobMetadata` gains a required `storage_scope`: one opaque, host-supplied prefix that the runtime composes `assets/`, `results/` and `payloads/` onto and never parses. The runtime does not learn what a tenant, an organization or a method is, and that is deliberate — those are host concepts with no meaning in an MIT-licensed runtime, so threading them through the transport was rejected in favour of one string the host fills however its own tenancy works. `PipelexPipeRunInput` carries it across the boundary alongside a now-required `user_id`.
+
+ **It is validated at construction, on the type.** The value becomes a storage key prefix, so a `..` or a leading slash in it is a traversal out of the tenant's namespace; a `JobMetadata` that exists is one whose scope is safe, which makes every key derived downstream safe by construction rather than by each call site remembering. This replaces a per-segment sanitizer that ran over `user_id` and `pipeline_run_id` separately — collapsing them into one slash-bearing string would otherwise have deleted that control silently.
+
+ **`uri_format` loses both `{primary_id}` and `{secondary_id}`, replaced by one `{storage_scope}`.** Supported placeholders are now `{storage_scope}`, `{hash}` and `{extension}`, and the shipped default becomes `{storage_scope}/{hash}.{extension}`. This is not a rename of `{primary_id}`: keeping that name would have left the configuration saying "primary" with no "secondary" for it to be primary to, and given an operator no way to tell that the placeholder means _the whole tenant prefix_ rather than _some id_. `{hash}` is unchanged — the first 16 hex chars of the SHA-256 of the file's own bytes, so identical output keeps one name instead of accumulating duplicates.
+
+ A configuration naming either retired placeholder is refused **at boot**, by name, with the supported set listed. The free-string value domain is not something the migration ledger can prove stale — per `docs/migration-ledger.md` a `remap_value` there could only be `unsafe`, i.e. reported and never applied — so this is a loud failure rather than a repair. Edit `uri_format` in your `.pipelex/pipelex.toml` if you customized it.
+
+- **Breaking: `"anonymous"` no longer appears anywhere on the identity or storage path, and a test keeps it that way**: The dry-run paths still passed `OTelConstants.DEFAULT_USER_ID` as a `user_id`, which is the last place the telemetry placeholder was still being bound as an identity. They now pass `DRY_RUN_USER_ID` — a dry run has no caller in the identity sense either, so it says so in its own word rather than borrowing tracing's. The constant survives for telemetry, where "a span with no known caller" is a real concept.
+
+ `test_storage_scope.py` now scans every module under `pipelex/` and fails if `DEFAULT_USER_ID` is ever bound to a `user_id` or a `storage_scope` again. The pattern deliberately matches an annotated parameter default (`user_id: str = OTelConstants.DEFAULT_USER_ID`) as well as a plain assignment — the first version of the guard did not, and passed a real injected regression while looking like it worked.
+
+- **Breaking: identity is required, and `"anonymous"` goes back to being a tracing label**: `pipeline_run_setup` coalesced a missing `user_id` to `OTelConstants.DEFAULT_USER_ID` — the string `"anonymous"`, a _tracing_ placeholder for a span with no known caller. It leaked into the identity path and became a storage key prefix, so every run without an authenticated caller wrote into one shared `anonymous/` namespace where each tenant could read the others' outputs. The fallback is what made it silent: a missing identity looked exactly like a present one.
+
+ `user_id` and `storage_scope` are now required parameters of `pipeline_run_setup` and `prepare_pipe_job`, so the same omission is a `TypeError` at the call site instead of a shared prefix in production. The constant survives for telemetry only.
+
+ Two callers pass explicit, greppable values rather than inheriting a default: a dry run — which provably stores nothing — passes `DRY_RUN_STORAGE_SCOPE`, and `PipelexMTHDSProtocol` defaults to `LOCAL_USER_ID` / `LOCAL_STORAGE_SCOPE`, because a run on somebody's own machine genuinely has one user and no tenancy. A constructor default stating a true fact at the boundary where it is true is a different thing from an `or` fallback deep in the call stack, and a multi-tenant host cannot reach these by omission — the seam it calls requires both explicitly.
+
### Fixed
- **The codegen stamp header is now read strictly:** `pipelex codegen check` verified a generated file as pristine even when a line had been injected between the stamp's fence markers, because the content hash covers only the body *below* the fence — so an executable statement could sit inside a header that says `DO NOT EDIT` and the tree would still report as current. Any line inside the header that does not carry the file's comment prefix now makes the stamp unparseable, which the check already reports as `hand-edited`. The `options` value must also be conformant JSON: Python's non-standard `NaN` / `Infinity` / `-Infinity` literals are refused, so a stamp cannot hold something only a Python reader accepts — the header is a cross-language interchange format, and the second implementation of the offline check (in `@pipelex/sdk`) already rejected them. Commented `key: value` lines a reader does not recognise are still ignored, so the header can gain fields without breaking older readers. One consequence to know: a file whose header was tampered with is no longer one `pipelex codegen types` will overwrite — it now refuses a destination it cannot prove it owns rather than clobbering work, so such a file has to be removed before regenerating, which is what the check's advice already tells you to do.