M11.1: genome schema 2 with per-second rates (ADR-0099, segment 2)
Foundation / checks (deploy) (push) Successful in 3m32s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (client) (push) Successful in 12m56s
Foundation / checks (network) (push) Successful in 13m46s
Foundation / checks (tsan) (push) Successful in 7m59s
Foundation / checks (checks) (push) Successful in 33m36s
Foundation / checks (postgres) (push) Successful in 45m30s
Foundation / postgres-tools (push) Successful in 20s
Foundation / server-image (push) Successful in 25s
Foundation / image (push) Successful in 2m36s
Foundation / checks (deploy) (push) Successful in 3m32s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (client) (push) Successful in 12m56s
Foundation / checks (network) (push) Successful in 13m46s
Foundation / checks (tsan) (push) Successful in 7m59s
Foundation / checks (checks) (push) Successful in 33m36s
Foundation / checks (postgres) (push) Successful in 45m30s
Foundation / postgres-tools (push) Successful in 20s
Foundation / server-image (push) Successful in 25s
Foundation / image (push) Successful in 2m36s
Movement and ingestion are stored per second in schema 2 (ranges x20). Schema 1 records stay valid, are never rewritten, and read as exactly x20 via Genome::per_second; drafts default to schema 1 so existing literals keep their meaning. Development version 1 converts genome rates at its own 50 ms quantum (round down), so phenotypes are unchanged. Mutation keeps the parent's schema and step; the lineage archive header names exactly the highest schema held (all-schema-1 archives keep their bytes); the development-v1 opening names schema 1. No golden changed; two tests that used 2 as an unknown schema now use the next one. Refresh the dev session window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-2
@@ -20,8 +20,12 @@ the maintainer chose directional rounding):
|
||||
- **Segment 1 (done):** `accounting/rates.hpp` converts a per-second rate to a per-tick
|
||||
amount without saved state. Costs round up and capacities down, so rounding never
|
||||
favours the organism. The migration's exact ×20 inverse refuses inexact values.
|
||||
- **Segments 2–3 (next):** genome schema v2, development version 2, and the process and
|
||||
checkpoint fields, with unchanged 50 ms goldens.
|
||||
- **Segment 2 (done):** genome schema 2 stores rates per second. Schema 1 records are
|
||||
read ×20 and never rewritten. Development version 1 converts at its own 50 ms
|
||||
quantum, mutation keeps a lineage's schema, and an archive of schema 1 records keeps
|
||||
its bytes. No behaviour or golden changed.
|
||||
- **Segment 3 (next):** development outputs, feeding and decay limits per second,
|
||||
converted at each process's tick.
|
||||
|
||||
Open from M10 (BACKLOG):
|
||||
- the maintainer's native-client observation, moved to the later 2k drill;
|
||||
|
||||
@@ -77,6 +77,27 @@ contract and a versioned migration that preserves 50 ms behaviour.
|
||||
or not at all, would rescale biology. The goldens at 50 ms are the guard against
|
||||
this.
|
||||
|
||||
## Segment 2 as implemented (2026-10-09)
|
||||
- **Genome schema 2** ([genome-v2.md](../../schemas/genome-v2.md)): movement and
|
||||
ingestion are per second, with ranges ×20. `Genome::per_second` reads either schema.
|
||||
A schema 1 rate reads as exactly ×20.
|
||||
- **Drafts** default to schema 1, so every existing literal keeps its per-tick
|
||||
meaning. New records name schema 2.
|
||||
- **Development version 1 stays defined in 50 ms ticks**
|
||||
(`development_v1_tick_microseconds`). It reads genome rates per second and converts
|
||||
them at that quantum, rounding down (capacities). Its per-tick outputs are unchanged.
|
||||
A schema 1 genome and its exact schema 2 translation develop identically.
|
||||
Development's outputs move to per-second rates in segment 3, at the consumers.
|
||||
- **Mutation** keeps the parent's schema and step. Mutation offers are seeded from the
|
||||
genome's digest, so migrating a lineage's records would change every later offer;
|
||||
no lineage is migrated.
|
||||
- **The lineage archive** header names exactly the highest schema held. An all-schema-1
|
||||
archive, which is what dev worlds hold, keeps its bytes.
|
||||
- **The development opening** (`development-v1`) names schema 1 explicitly; it is a
|
||||
fixed genesis.
|
||||
- **Tests that used 2 as an unknown future schema** now use the next unknown one. The
|
||||
archive decoder refuses a header that misstates its contents.
|
||||
|
||||
## Consequences
|
||||
- Segment 1: `accounting/rates.hpp` (`per_tick`, `exact_per_tick`,
|
||||
`per_second_from_per_tick`) and the `rate-contracts` test.
|
||||
|
||||
@@ -116,6 +116,14 @@ viable organism: validation proves neither developmental feasibility nor
|
||||
biological plausibility, and the schema ranges are expressible bounds rather than
|
||||
balance. Fitness remains an outcome, not a score held in the record.
|
||||
|
||||
### Schema 2 (M11.1, ADR-0099)
|
||||
Schema 2 states the movement and ingestion rates per second (×20 ranges), so biology
|
||||
is no longer tied to the 50 ms tick. Schema 1 records stay valid and are never
|
||||
rewritten. They read as exactly ×20 through `Genome::per_second`. Drafts default to
|
||||
schema 1. Mutation keeps a lineage's schema. Development version 1 converts rates
|
||||
back to its own 50 ms quantum, so nothing behaves differently.
|
||||
See [genome-v2.md](../../schemas/genome-v2.md).
|
||||
|
||||
## Implemented M3.2 development and phenotype
|
||||
|
||||
[ADR-0031](../adr/0031-development-and-phenotype.md) adds `derive_phenotype` and
|
||||
|
||||
@@ -5372,3 +5372,30 @@ Executed:
|
||||
- Windows `debug`: 61/61.
|
||||
|
||||
No biology uses the conversion yet, so no golden is affected.
|
||||
|
||||
## 2026-10-09 — M11.1 time-based rates, segment 2: genome schema 2 (ADR-0099)
|
||||
|
||||
Genome schema 2 stores movement and ingestion per second (ranges ×20;
|
||||
`schemas/genome-v2.md`). Schema 1 records stay valid and read as exactly ×20, and drafts
|
||||
default to schema 1. Development version 1 converts genome rates at its 50 ms quantum.
|
||||
Mutation keeps the parent's schema and step. The lineage archive header names exactly
|
||||
the highest schema held, and the development opening names schema 1.
|
||||
|
||||
New tests:
|
||||
- `schema_v2_rates` (genome);
|
||||
- range boundaries per schema;
|
||||
- `schemas_mix_without_rewriting` (archive);
|
||||
- `schema_v2_rates_develop_identically`: phenotypes and plans equal across schemas, and
|
||||
sub-tick rates round down;
|
||||
- `successors_keep_their_parents_schema` (mutation).
|
||||
|
||||
Two existing tests used 2 as "an unknown future schema". They now use the next unknown
|
||||
schema, and the archive decoder now refuses a header that misstates its contents. No
|
||||
golden changed: the frozen schema 1 record and its digest are byte-identical.
|
||||
|
||||
Executed:
|
||||
- WSL `linux-debug` and `linux-asan`: 61/61 each.
|
||||
- clang-tidy 19 on the changed sources and tests: clean.
|
||||
- The 18 Postgres suites passed, including region upgrade and clone comparison, so
|
||||
checkpoints are unchanged.
|
||||
- Windows `debug`: 61/61.
|
||||
|
||||
Reference in New Issue
Block a user