Skip to content

fix(python): pass only validated input to the repository in generated routes - #566

Merged
dmealing merged 3 commits into
release/1.2from
fm/mo-py-input-fix-121
Nov 13, 2026
Merged

dmealing merged 3 commits into
release/1.2from
fm/mo-py-input-fix-121

Conversation

@dmealing

@dmealing dmealing commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What Changed

  • Generated FastAPI create, PATCH and PUT handlers (plain and TPH per-subtype) now hand the repository only the keys the input model validated, at every depth. A client-sent id, a readOnly field, a frozen field on update and any undeclared key such as isAdmin are dropped silently. A malformed value on a settable field still returns 400 {"error": "validation"}.
  • router_generator.py emits a shared _validated_input / _validated_value helper and a _validated_input_lines helper used by every validating handler. The existing FR-037 frozen-field pop stays in place as the seam an owned router edits.
  • Python package bumped to 1.2.1 (pyproject.toml, uv.lock), with a CHANGELOG entry, updated docs/features/generated-mutations.md and KNOWN_GAPS.md, a regenerated showcase router and .hashes.json, and a new integration test module test_generated_router_validated_input.py.
  • Validated in two no-mistakes runs. Run 1 failed in the test step for environmental reasons: an unrelated TypeScript compile test timed out under machine load, then the gate's agent timed out. Run 2 passed every step.
Validation

Risk Assessment

✅ Low: Well-bounded security fix: all four write handlers rebind the body to model-validated keys, every write path is covered (plain + TPH; read-only routers have no writes), behavior-compatible value semantics are preserved and documented, and the fix is gated by a behavioral integration test with an independent oracle.

Testing

Baseline TS gate was already green. For the Python change I drove the real generated router live. Codegen ran from this worktree (1.2.1) and from commit 89a6774 (1.2.0). Each router was served by uvicorn on 127.0.0.1 with a recording repository, then driven over HTTP with synthetic payloads. On 1.2.0 the repository received id 999, isAdmin, role and the nested zip key, which reproduces the reported defect. On 1.2.1 it receives only declared, settable keys, and boundary 400s still hold with no write. The 1.2.1 regression test file fails on the 1.2.0 tree (8 failed, 2 errors) and passes on the fix. The full Python suite (uv run --extra integration pytest tests/ -n 8, Docker up) finished EXIT=0 with 4437 passed and 11 skipped. The TPH subtype handler was not driven live. Servers stopped and worktree is clean. No PyPI publish or release-branch step was run in this phase.

  • Live validation: ✅ go - 11 of 12 scenarios driven live against the product
Scenario Result Live Evidence
Create with client-sent id, made-up isAdmin and harmless extra field returns 201 and repo gets only name + server createdAt (live, local FastAPI+uvicorn, synthetic payload) ✅ pass live live-scenarios.md (1.2.1 S1); live-run-fix-1.2.1.json; live-repo-writes-1.2.1.jsonl
Create with readOnly role sent by client drops role; writeOnce tenant on create is kept (live, synthetic payload) ✅ pass live live-scenarios.md (1.2.1 S2); live-run-fix-1.2.1.json
Create with undeclared key inside nested value object drops the key at depth (live, synthetic payload) ✅ pass live live-scenarios.md (1.2.1 S3); live-run-fix-1.2.1.json
Legitimate full create keeps every settable value unchanged (live, synthetic payload, boundary against over-stripping) ✅ pass live live-scenarios.md (1.2.1 S4)
Boundary: create with name over maxLength 80 still returns 400 and writes nothing (live) ✅ pass live live-scenarios.md (1.2.1 S5); repo-write log has no entry
Boundary: create with required name missing still returns 400 and writes nothing (live) ✅ pass live live-scenarios.md (1.2.1 S6)
PATCH with client id, readOnly role and undeclared isAdmin applies only the name (live) ✅ pass live live-scenarios.md (1.2.1 S7); live-run-fix-1.2.1.json
PUT with frozen writeOnce tenant and nested undeclared zip strips both (live) ✅ pass live live-scenarios.md (1.2.1 S8)
Boundary: PATCH with explicit null on required name still returns 400 and writes nothing (live) ✅ pass live live-scenarios.md (1.2.1 S9)
PATCH with explicit null on nested object clears it and drops client isAdmin/role (live) ✅ pass live curl PATCH /api/members/1 against port 8102; repo-write log final line
Control: 1.2.0 baseline reproduces the reported leak (live, same driver, base codegen at commit 89a6774) ✅ pass live live-scenarios.md (1.2.0 table); live-run-base-1.2.0.json
TPH per-subtype create/update drop client id and undeclared field (live) ⏸️ untested no Not driven over live HTTP: a TPH generated app was not built as a live server in this phase. In-process TestClient pytest covers it. A live TPH driver would need a discriminated hierarchy in the gen_a…
Evidence: Live scenario transcript (1.2.0 vs 1.2.1)
# 1.2.1 Python generated routes: live scenario transcript

Live: generated Member router (real `run_gen` output, Python codegen from this worktree for 1.2.1; `git archive 89a677469` for 1.2.0) served by uvicorn on 127.0.0.1, recording repository, driven over HTTP with urllib. Synthetic inputs. Repo writes read back from the server's write log.

Columns: scenario | HTTP status | keys the repository received

## 1.2.0 baseline (commit 89a677469) — defect reproduction

| scenario | status | repository received |
|---|---|---|
| S1 create: client id + made-up isAdmin + harmless extra field | 201 | create {"id": 999, "name": "Mallory", "isAdmin": true, "nickname": "m", "createdAt": "2026-11-13 09:27:47.057219+00:00"} |
| S2 create: readOnly role + writeOnce tenant sent by client | 201 | create {"name": "Eve", "role": "admin", "tenant": "acme", "createdAt": "2026-11-13 09:27:47.058809+00:00"} |
| S3 create: nested value object with undeclared key | 201 | create {"name": "Nested", "address": {"city": "Oslo", "zip": "0150"}, "createdAt": "2026-11-13 09:27:47.059707+00:00"} |
| S4 create: legit full payload keeps every settable value | 201 | create {"name": "Full", "tenant": "acme", "address": {"city": "Oslo"}, "createdAt": "2026-11-13 09:27:47.060485+00:00"} |
| S5 boundary create: name over maxLength 80 -> 400, no write | 400 | (no write) |
| S6 boundary create: required name missing -> 400, no write | 400 | (no write) |
| S7 patch: client id + readOnly role + undeclared isAdmin + name | 200 | update {"id": 5, "isAdmin": true, "name": "Renamed"} |
| S8 put: frozen tenant + nested undeclared zip | 200 | update {"name": "Put", "address": {"city": "Bergen", "zip": "5000"}} |
| S9 boundary patch: explicit null on required name -> 400, no write | 400 | (no write) |

## 1.2.1 fix (commit 6c793d073)

| scenario | status | repository received |
|---|---|---|
| S1 create: client id + made-up isAdmin + harmless extra field | 201 | create {"name": "Mallory", "createdAt": "2026-11-13 09:27:49.469107+00:00"} |
| S2 create: readOnly role + writeOnce tenant sent by client | 201 | create {"name": "Eve", "tenant": "acme", "createdAt": "2026-11-13 09:27:49.470948+00:00"} |
| S3 create: nested value object with undeclared key | 201 | create {"name": "Nested", "address": {"city": "Oslo"}, "createdAt": "2026-11-13 09:27:49.472058+00:00"} |
| S4 create: legit full payload keeps every settable value | 201 | create {"name": "Full", "tenant": "acme", "address": {"city": "Oslo"}, "createdAt": "2026-11-13 09:27:49.472969+00:00"} |
| S5 boundary create: name over maxLength 80 -> 400, no write | 400 | (no write) |
| S6 boundary create: required name missing -> 400, no write | 400 | (no write) |
| S7 patch: client id + readOnly role + undeclared isAdmin + name | 200 | update {"name": "Renamed"} |
| S8 put: frozen tenant + nested undeclared zip | 200 | update {"name": "Put", "address": {"city": "Bergen"}} |
| S9 boundary patch: explicit null on required name -> 400, no write | 400 | (no write) |

Extra (1.2.1, PATCH null on nested object with client isAdmin/role): status 200, repo received `{"address": null}` only.
Evidence: Live run JSON, 1.2.0 baseline
{
  "label": "1.2.0 base (defect reproduction)",
  "base": "http://127.0.0.1:8101",
  "results": [
    {
      "scenario": "S1 create: client id + made-up isAdmin + harmless extra field",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "id": 999,
          "name": "Mallory",
          "isAdmin": true,
          "nickname": "m"
        }
      },
      "status": 201,
      "response": "{\"id\":999,\"name\":\"Mallory\",\"isAdmin\":true,\"nickname\":\"m\",\"createdAt\":\"2026-11-13T09:27:47.057219Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "id": 999,
            "name": "Mallory",
            "isAdmin": true,
            "nickname": "m",
            "createdAt": "2026-11-13 09:27:47.057219+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S2 create: readOnly role + writeOnce tenant sent by client",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "Eve",
          "role": "admin",
          "tenant": "acme"
        }
      },
      "status": 201,
      "response": "{\"id\":2,\"name\":\"Eve\",\"role\":\"admin\",\"tenant\":\"acme\",\"createdAt\":\"2026-11-13T09:27:47.058809Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Eve",
            "role": "admin",
            "tenant": "acme",
            "createdAt": "2026-11-13 09:27:47.058809+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S3 create: nested value object with undeclared key",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "Nested",
          "address": {
            "city": "Oslo",
            "zip": "0150"
          }
        }
      },
      "status": 201,
      "response": "{\"id\":3,\"name\":\"Nested\",\"address\":{\"city\":\"Oslo\",\"zip\":\"0150\"},\"createdAt\":\"2026-11-13T09:27:47.059707Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Nested",
            "address": {
              "city": "Oslo",
              "zip": "0150"
            },
            "createdAt": "2026-11-13 09:27:47.059707+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S4 create: legit full payload keeps every settable value",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "Full",
          "tenant": "acme",
          "address": {
            "city": "Oslo"
          }
        }
      },
      "status": 201,
      "response": "{\"id\":4,\"name\":\"Full\",\"tenant\":\"acme\",\"address\":{\"city\":\"Oslo\"},\"createdAt\":\"2026-11-13T09:27:47.060485Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Full",
            "tenant": "acme",
            "address": {
              "city": "Oslo"
            },
            "createdAt": "2026-11-13 09:27:47.060485+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S5 boundary create: name over maxLength 80 -> 400, no write",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }
      },
      "status": 400,
      "response": "{\"error\":\"validation\"}",
      "repo_writes": []
    },
    {
      "scenario": "S6 boundary create: required name missing -> 400, no write",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "isAdmin": true
        }
      },
      "status": 400,
      "response": "{\"error\":\"validation\"}",
      "repo_writes": []
    },
    {
      "scenario": "S7 patch: client id + readOnly role + undeclared isAdmin + name",
      "request": {
        "method": "PATCH",
        "path": "/api/members/1",
        "body": {
          "id": 5,
          "role": "admin",
          "isAdmin": true,
          "name": "Renamed"
        }
      },
      "status": 200,
      "response": "{\"id\":5,\"name\":\"Renamed\",\"isAdmin\":true,\"nickname\":\"m\",\"createdAt\":\"2026-11-13T09:27:47.057219Z\"}",
      "repo_writes": [
        {
          "op": "update",
          "dto": {
            "id": 5,
            "isAdmin": true,
            "name": "Renamed"
          }
        }
      ]
    },
    {
      "scenario": "S8 put: frozen tenant + nested undeclared zip",
      "request": {
        "method": "PUT",
        "path": "/api/members/1",
        "body": {
          "name": "Put",
          "tenant": "evil",
          "address": {
            "city": "Bergen",
            "zip": "5000"
          }
        }
      },
      "status": 200,
      "response": "{\"id\":5,\"name\":\"Put\",\"isAdmin\":true,\"nickname\":\"m\",\"createdAt\":\"2026-11-13T09:27:47.057219Z\",\"address\":{\"city\":\"Bergen\",\"zip\":\"5000\"}}",
      "repo_writes": [
        {
          "op": "update",
          "dto": {
            "name": "Put",
            "address": {
              "city": "Bergen",
              "zip": "5000"
            }
          }
        }
      ]
    },
    {
      "scenario": "S9 boundary patch: explicit null on required name -> 400, no write",
      "request": {
        "method": "PATCH",
        "path": "/api/members/1",
        "body": {
          "name": null
        }
      },
      "status": 400,
      "response": "{\"error\":\"validation\"}",
      "repo_writes": []
    }
  ]
}
Evidence: Live run JSON, 1.2.1 fix
{
  "label": "1.2.1 fix",
  "base": "http://127.0.0.1:8102",
  "results": [
    {
      "scenario": "S1 create: client id + made-up isAdmin + harmless extra field",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "id": 999,
          "name": "Mallory",
          "isAdmin": true,
          "nickname": "m"
        }
      },
      "status": 201,
      "response": "{\"id\":1,\"name\":\"Mallory\",\"createdAt\":\"2026-11-13T09:27:49.469107Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Mallory",
            "createdAt": "2026-11-13 09:27:49.469107+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S2 create: readOnly role + writeOnce tenant sent by client",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "Eve",
          "role": "admin",
          "tenant": "acme"
        }
      },
      "status": 201,
      "response": "{\"id\":2,\"name\":\"Eve\",\"tenant\":\"acme\",\"createdAt\":\"2026-11-13T09:27:49.470948Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Eve",
            "tenant": "acme",
            "createdAt": "2026-11-13 09:27:49.470948+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S3 create: nested value object with undeclared key",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "Nested",
          "address": {
            "city": "Oslo",
            "zip": "0150"
          }
        }
      },
      "status": 201,
      "response": "{\"id\":3,\"name\":\"Nested\",\"address\":{\"city\":\"Oslo\"},\"createdAt\":\"2026-11-13T09:27:49.472058Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Nested",
            "address": {
              "city": "Oslo"
            },
            "createdAt": "2026-11-13 09:27:49.472058+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S4 create: legit full payload keeps every settable value",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "Full",
          "tenant": "acme",
          "address": {
            "city": "Oslo"
          }
        }
      },
      "status": 201,
      "response": "{\"id\":4,\"name\":\"Full\",\"tenant\":\"acme\",\"address\":{\"city\":\"Oslo\"},\"createdAt\":\"2026-11-13T09:27:49.472969Z\"}",
      "repo_writes": [
        {
          "op": "create",
          "dto": {
            "name": "Full",
            "tenant": "acme",
            "address": {
              "city": "Oslo"
            },
            "createdAt": "2026-11-13 09:27:49.472969+00:00"
          }
        }
      ]
    },
    {
      "scenario": "S5 boundary create: name over maxLength 80 -> 400, no write",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }
      },
      "status": 400,
      "response": "{\"error\":\"validation\"}",
      "repo_writes": []
    },
    {
      "scenario": "S6 boundary create: required name missing -> 400, no write",
      "request": {
        "method": "POST",
        "path": "/api/members",
        "body": {
          "isAdmin": true
        }
      },
      "status": 400,
      "response": "{\"error\":\"validation\"}",
      "repo_writes": []
    },
    {
      "scenario": "S7 patch: client id + readOnly role + undeclared isAdmin + name",
      "request": {
        "method": "PATCH",
        "path": "/api/members/1",
        "body": {
          "id": 5,
          "role": "admin",
          "isAdmin": true,
          "name": "Renamed"
        }
      },
      "status": 200,
      "response": "{\"id\":1,\"name\":\"Renamed\",\"createdAt\":\"2026-11-13T09:27:49.469107Z\"}",
      "repo_writes": [
        {
          "op": "update",
          "dto": {
            "name": "Renamed"
          }
        }
      ]
    },
    {
      "scenario": "S8 put: frozen tenant + nested undeclared zip",
      "request": {
        "method": "PUT",
        "path": "/api/members/1",
        "body": {
          "name": "Put",
          "tenant": "evil",
          "address": {
            "city": "Bergen",
            "zip": "5000"
          }
        }
      },
      "status": 200,
      "response": "{\"id\":1,\"name\":\"Put\",\"createdAt\":\"2026-11-13T09:27:49.469107Z\",\"address\":{\"city\":\"Bergen\"}}",
      "repo_writes": [
        {
          "op": "update",
          "dto": {
            "name": "Put",
            "address": {
              "city": "Bergen"
            }
          }
        }
      ]
    },
    {
      "scenario": "S9 boundary patch: explicit null on required name -> 400, no write",
      "request": {
        "method": "PATCH",
        "path": "/api/members/1",
        "body": {
          "name": null
        }
      },
      "status": 400,
      "response": "{\"error\":\"validation\"}",
      "repo_writes": []
    }
  ]
}
Evidence: Repo-write log, 1.2.0
{"op": "create", "dto": {"id": 999, "name": "Mallory", "isAdmin": true, "nickname": "m", "createdAt": "2026-11-13 09:27:47.057219+00:00"}}
{"op": "create", "dto": {"name": "Eve", "role": "admin", "tenant": "acme", "createdAt": "2026-11-13 09:27:47.058809+00:00"}}
{"op": "create", "dto": {"name": "Nested", "address": {"city": "Oslo", "zip": "0150"}, "createdAt": "2026-11-13 09:27:47.059707+00:00"}}
{"op": "create", "dto": {"name": "Full", "tenant": "acme", "address": {"city": "Oslo"}, "createdAt": "2026-11-13 09:27:47.060485+00:00"}}
{"op": "update", "dto": {"id": 5, "isAdmin": true, "name": "Renamed"}}
{"op": "update", "dto": {"name": "Put", "address": {"city": "Bergen", "zip": "5000"}}}
Evidence: Repo-write log, 1.2.1
{"op": "create", "dto": {"name": "Mallory", "createdAt": "2026-11-13 09:27:49.469107+00:00"}}
{"op": "create", "dto": {"name": "Eve", "tenant": "acme", "createdAt": "2026-11-13 09:27:49.470948+00:00"}}
{"op": "create", "dto": {"name": "Nested", "address": {"city": "Oslo"}, "createdAt": "2026-11-13 09:27:49.472058+00:00"}}
{"op": "create", "dto": {"name": "Full", "tenant": "acme", "address": {"city": "Oslo"}, "createdAt": "2026-11-13 09:27:49.472969+00:00"}}
{"op": "update", "dto": {"name": "Renamed"}}
{"op": "update", "dto": {"name": "Put", "address": {"city": "Bergen"}}}
{"op": "update", "dto": {"address": null}}
Evidence: Full Python regression suite log
bringing up nodes...
bringing up nodes...

........................................................................ [  1%]
........................................................................ [  3%]
........................................................................ [  4%]
........................................................................ [  6%]
........................................................................ [  8%]
........................................................................ [  9%]
........................................................................ [ 11%]
........................................................................ [ 12%]
........................................................................ [ 14%]
........................................................................ [ 16%]
........................................................................ [ 17%]
........................................................................ [ 19%]
........................................................................ [ 21%]
........................................................................ [ 22%]
........................................................................ [ 24%]
........................................................................ [ 25%]
........................................................................ [ 27%]
........................................................................ [ 29%]
........................................................................ [ 30%]
........................................................................ [ 32%]
........................................................................ [ 33%]
........................................................................ [ 35%]
........................................................................ [ 37%]
........................................................................ [ 38%]
........................................................................ [ 40%]
........................................................................ [ 42%]
........................................................................ [ 43%]
........................................................................ [ 45%]
........................................................................ [ 46%]
........................................................................ [ 48%]
........................................................................ [ 50%]
........................................................................ [ 51%]
........................................................................ [ 53%]
........................................................................ [ 55%]
........................................................................ [ 56%]
........................................................................ [ 58%]
........................................................................ [ 59%]
........................................................................ [ 61%]
........................................................................ [ 63%]
........................................................................ [ 64%]
........................................................................ [ 66%]
........................................................................ [ 67%]
........................................................................ [ 69%]
........................................................................ [ 71%]
........................................................................ [ 72%]
........................................................................ [ 74%]
........................................................................ [ 76%]
........................................................................ [ 77%]
........................................................................ [ 79%]
........................................................................ [ 80%]
........................................................................ [ 82%]
........................................................................ [ 84%]
........................................................................ [ 85%]
........................................................................ [ 87%]
........................................................................ [ 89%]
........................................................................ [ 90%]
........................................................................ [ 92%]
........................................................................ [ 93%]
........................................................................ [ 95%]
........................................................................ [ 97%]
............................................s.s.s.s.s.s.sss....s........ [ 98%]
..s.....................................................                 [100%]
=============================== warnings summary ===============================
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434
  {run-worktree}/server/python/.venv/lib/python3.14/site-packages/_pytest/config/__init__.py:1434: PytestConfigWarning: Unknown config option: cache_dir
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197
  {run-worktree}/server/python/.venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197: UserWarning: no .metaobjects/config.json found at or above {run-worktree}/fixtures/codegen-conformance/cross-package-binding/input: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    exec(co, module.__dict__)

tests/codegen/test_m2m_codegen.py:117
  {run-worktree}/server/python/tests/codegen/test_m2m_codegen.py:117: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/m2m-meta-bt4fweam: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    _ENTITIES = _load_entities()

tests/codegen/test_report_credential.py:64
  {run-worktree}/server/python/tests/codegen/test_report_credential.py:64: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/report-credential-pcx7m7ml: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(

... [613608 bytes truncated] ...

tures/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_generated.py::test_subtype_level_traversal_returns_its_own_relations
  {run-worktree}/server/python/tests/integration/test_tph_m2m_generated.py:261: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-gen-meta-h4amep00: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_generated.py::test_subtype_mismatch_returns_200_empty_list_not_404
  {run-worktree}/server/python/tests/integration/test_tph_m2m_generated.py:261: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-gen-meta-bgudk8qd: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_generated.py::test_subtype_only_relation_traversal
  {run-worktree}/server/python/tests/integration/test_tph_m2m_generated.py:261: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-gen-meta-8rm98bvh: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_generated.py::test_generated_router_enforces_subtype_gate_even_when_repo_does_not
  {run-worktree}/server/python/tests/integration/test_tph_m2m_generated.py:261: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-gen-meta-dhtk4657: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_shadowed_generated.py::test_base_mount_threads_an_explicit_none_and_returns_the_base_targets
  {run-worktree}/server/python/tests/integration/test_tph_m2m_shadowed_generated.py:239: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-shadow-meta-ussl3mkm: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_shadowed_generated.py::test_non_shadowing_subtype_mount_threads_an_explicit_none
  {run-worktree}/server/python/tests/integration/test_tph_m2m_shadowed_generated.py:239: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-shadow-meta-qe9mc66g: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_shadowed_generated.py::test_shadowing_subtype_mount_threads_its_own_target_discriminator
  {run-worktree}/server/python/tests/integration/test_tph_m2m_shadowed_generated.py:239: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-shadow-meta-awcd6lo7: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_tph_m2m_shadowed_generated.py::test_shadowed_subtype_gate_answers_empty_for_a_siblings_id
  {run-worktree}/server/python/tests/integration/test_tph_m2m_shadowed_generated.py:239: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/tph-m2m-shadow-meta-x5yu4ey2: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    entities = _load_entities(_META)

tests/integration/test_api_contract_decimal.py::test_decimal_scenario[postgres-decimal-array-exact]
  {run-worktree}/server/python/tests/integration/generated_report_app.py:167: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/apic-report-meta-_a3xa8yu: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    return attach_naming(_load_root(corpus_root / "meta.json"), corpus_root.parent)

tests/integration/test_api_contract_decimal.py::test_decimal_scenario[postgres-decimal-array-exact]
  {run-worktree}/server/python/tests/integration/generated_report_app.py:127: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/apic-report-meta-td1mvp5p: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    root = _load_root(corpus_root / "meta.json")

tests/integration/test_api_contract_decimal.py::test_decimal_scenario[sqlite-decimal-array-exact]
  {run-worktree}/server/python/tests/integration/generated_report_app.py:167: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/apic-report-meta-1o33u_i1: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    return attach_naming(_load_root(corpus_root / "meta.json"), corpus_root.parent)

tests/integration/test_api_contract_decimal.py::test_decimal_scenario[mysql-decimal-array-exact]
  {run-worktree}/server/python/tests/integration/generated_report_app.py:167: UserWarning: no .metaobjects/config.json found at or above {tmp-dir}/apic-report-meta-s54jx__w: physical names use the snake_case default. A database whose columns are named exactly like the fields needs "naming": {"columns": "literal"} in that file, or metaobjects.naming.attach_naming(root, project_dir) after the load (see docs/features/migrations/physical-naming.md).
    return attach_naming(_load_root(corpus_root / "meta.json"), corpus_root.parent)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
4437 passed, 11 skipped, 914 warnings in 277.76s (0:04:37)
EXIT=0
  • Evidence: Live driver scripts (gen_app, serve, drive) (local file: gen_app.py)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 11 of 12 scenarios driven live against the product
Scenario Result Live Evidence
Create with client-sent id, made-up isAdmin and harmless extra field returns 201 and repo gets only name + server createdAt (live, local FastAPI+uvicorn, synthetic payload) ✅ pass live live-scenarios.md (1.2.1 S1); live-run-fix-1.2.1.json; live-repo-writes-1.2.1.jsonl
Create with readOnly role sent by client drops role; writeOnce tenant on create is kept (live, synthetic payload) ✅ pass live live-scenarios.md (1.2.1 S2); live-run-fix-1.2.1.json
Create with undeclared key inside nested value object drops the key at depth (live, synthetic payload) ✅ pass live live-scenarios.md (1.2.1 S3); live-run-fix-1.2.1.json
Legitimate full create keeps every settable value unchanged (live, synthetic payload, boundary against over-stripping) ✅ pass live live-scenarios.md (1.2.1 S4)
Boundary: create with name over maxLength 80 still returns 400 and writes nothing (live) ✅ pass live live-scenarios.md (1.2.1 S5); repo-write log has no entry
Boundary: create with required name missing still returns 400 and writes nothing (live) ✅ pass live live-scenarios.md (1.2.1 S6)
PATCH with client id, readOnly role and undeclared isAdmin applies only the name (live) ✅ pass live live-scenarios.md (1.2.1 S7); live-run-fix-1.2.1.json
PUT with frozen writeOnce tenant and nested undeclared zip strips both (live) ✅ pass live live-scenarios.md (1.2.1 S8)
Boundary: PATCH with explicit null on required name still returns 400 and writes nothing (live) ✅ pass live live-scenarios.md (1.2.1 S9)
PATCH with explicit null on nested object clears it and drops client isAdmin/role (live) ✅ pass live curl PATCH /api/members/1 against port 8102; repo-write log final line
Control: 1.2.0 baseline reproduces the reported leak (live, same driver, base codegen at commit 89a6774) ✅ pass live live-scenarios.md (1.2.0 table); live-run-base-1.2.0.json
TPH per-subtype create/update drop client id and undeclared field (live) ⏸️ untested no Not driven over live HTTP: a TPH generated app was not built as a live server in this phase. In-process TestClient pytest covers it. A live TPH driver would need a discriminated hierarchy in the gen_a…
  • scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains
  • scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains (baseline, already green per context)
  • cd server/python && uv run --extra integration pytest tests/integration/test_generated_router_validated_input.py -q (12 passed)
  • cd server/python && uv run python {tmp-dir}/secfix-live/gen_app.py <out> (codegen of Member/Account entity with 1.2.1 metaobjects)
  • git archive 89a677469 server/python | tar -x (baseline 1.2.0 tree) then PYTHONPATH=<base>/src uv run python gen_app.py (baseline codegen)
  • uv run --with uvicorn python serve.py <pkg_parent> <record.jsonl> <port> for base (8101) and fix (8102), real HTTP
  • python3 drive.py http://127.0.0.1:<port> <record.jsonl> <label> driving S1-S9 over HTTP
  • curl PATCH /api/members/1 with address null plus isAdmin and role (extra live check)
  • Base tree: copied regression test in and ran pytest tests/integration/test_generated_router_validated_input.py -> 8 failed, 2 errors, 2 passed (fails before fix)
  • cd server/python && uv run --extra integration pytest tests/ -q -n 8 (full Python regression): 4437 passed, 11 skipped, EXIT=0
⚠️ **Document** - 2 infos
  • ℹ️ ADR-0045 (accepted 2026-07-23) table row says the Python router 'delegates raw DTOs to a consumer repository seam'. That was true when written. ADRs record decisions as of their date, so this is left as is. The fix is recorded in CHANGELOG 1.2.1 and docs/features/generated-mutations.md. Decide whether an ADR amendment is wanted.
  • ℹ️ Docs in docs/superpowers/specs/ (2026-07-13 generated-mutation-surface design) describe the old raw-body router. These are dated design records, not current docs, so they are left as is.
🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

…input (1.2.1)

The generated FastAPI create, PATCH and PUT handlers validated the body against
<Entity>Create / <Entity>Patch and then passed the RAW body to the repository.
Pydantic ignores undeclared keys and the input models leave out server-owned
fields, so a client-sent id, a readOnly field and a made-up field such as
isAdmin all reached the write. Security fix.

Each handler (plain and TPH per-subtype) now rebinds dto to the keys the input
model validated, at every depth, before any repository call, as the TypeScript
routes do. Undeclared and non-settable keys are dropped silently, never 400'd,
so a client sending an extra harmless field keeps working; values stay the
body's own, so repositories see the same value types as in 1.2.0.

Python package version 1.2.1 only; CHANGELOG entry under Security.
Regression gate: tests/integration/test_generated_router_validated_input.py.
@dmealing
dmealing merged commit 783ac21 into release/1.2 Nov 13, 2026
9 checks passed
@dmealing
dmealing deleted the fm/mo-py-input-fix-121 branch November 13, 2026 15:17
dmealing added a commit that referenced this pull request Nov 14, 2026
…rt (#580)

* fix(python): pass only validated input to the repository in generated routes (#566)

* fix(python): generated routes hand the repository only the validated input (1.2.1)

The generated FastAPI create, PATCH and PUT handlers validated the body against
<Entity>Create / <Entity>Patch and then passed the RAW body to the repository.
Pydantic ignores undeclared keys and the input models leave out server-owned
fields, so a client-sent id, a readOnly field and a made-up field such as
isAdmin all reached the write. Security fix.

Each handler (plain and TPH per-subtype) now rebinds dto to the keys the input
model validated, at every depth, before any repository call, as the TypeScript
routes do. Undeclared and non-settable keys are dropped silently, never 400'd,
so a client sending an extra harmless field keeps working; values stay the
body's own, so repositories see the same value types as in 1.2.0.

Python package version 1.2.1 only; CHANGELOG entry under Security.
Regression gate: tests/integration/test_generated_router_validated_input.py.

* no-mistakes(document): python routes pass only validated input

* no-mistakes(lint): regenerate showcase site payload for PyPI 1.2.1

* fix(codegen): generated routes drop server-owned and undeclared input in every port

An audit after the Python 1.2.1 fix found the same request-input hole in the
other ports' generated create handlers. Each port now drops, silently and before
the write, a server-generated key, readOnly and derived fields, and on a TPH
per-subtype route the discriminator and sibling-subtype columns; undeclared keys
are dropped everywhere.

- Python: forward-port of the 1.2.1 fix; TPH create drops a body discriminator.
- Java: create nulls the dropped DTO components; DTOs ignore unknown properties.
- Kotlin: create writes only settable columns; entity classes ignore unknown keys.
- C#: create resets the generated key, discriminator and M:N navigations; every
  readOnly property gets a private setter.
- TypeScript: an assigned primary key leaves the update schema.

Shared api-contract scenarios input-server-owned-dropped (core) and
tph-input-server-owned-dropped, a readOnly column in secret-fields, and an
`absent` assertion in every runner gate it.

* feat(codegen): a validation 400 lists every issue in every port

The same model answered a failed create or update differently by language:
TypeScript listed each problem, while C#, Java, Kotlin and Python returned a
bare {"error":"validation"}. Every port's generated routes and its hand-rolled
reference servers now answer 400 {"error":"validation","issues":[{code,path,
message}]} with every failure, codes in Zod's vocabulary and path as an array of
wire names.

- C#: ValidationIssues runtime file (ejected with routes); create reads the
  body itself so an unbindable body lists its issue; PATCH collects instead of
  returning on the first failure.
- Java: ValidationIssues runtime helper; a Patch binds every field before it
  throws. Kotlin: per-package MetaValidationIssues.kt; create lists every
  absent required value.
- Python: every Pydantic error mapped in constraint_errors; decimal failures
  carry their wire path.

Shared scenarios validation-lists-issues and tph-validation-lists-issues, with a
new `issues` assertion in every runner, gate it in both lanes.

* feat(api): a page size for generated list routes, api.pagination (TypeScript)

List endpoints had no hard cap: a TypeScript or C# list with no `limit`
returned the whole table and `?limit=100000` was accepted everywhere. A project
can now set `"api": { "pagination": { "defaultLimit": N, "maxLimit": M } }` in
.metaobjects/config.json: a generated entity or projection list with no
`limit` answers the default page, and a `limit` above the cap answers
400 {"error":"limit_too_large","maxLimit":M}. Reports keep their own row cap
and opaque views their 1000.

- sdk reads and validates the block; the loaded root carries it
  (apiPaginationOf), as it carries the wire format.
- runtime-ts mounts take a `pagination` option (pageLimit); the packaged and
  reference Fastify and Hono routes emit it. Owned copies re-synced.
- meta init writes 50 / 1000 for a new project; `--force` over an existing
  config does not add it. A project without the setting behaves as before, and
  meta verify advises (rule unbounded-list-pages) when routes are wired.
- New api-contract `pagination/` sub-corpus, run in the TypeScript generated
  lane. The C#, Java, Kotlin and Python routes do not read it yet: their REST
  generators are under the non-TS freeze, pending that ruling.

A config key, not vocabulary: metamodelVersion does not move.

* feat(api): api.pagination in every port, and api.unknownFields (reject by default)

api.pagination (default page size and hard cap on generated list routes)
now reaches the C#, Java, Kotlin and Python generators as well as
TypeScript: no limit answers the default page, a limit over the cap is
400 limit_too_large. No setting keeps today's behaviour. verify advises
when routes are generated without it (TypeScript, Python, Java/Kotlin,
and C# under verify --codegen).

api.unknownFields (reject | drop, default reject): a generated create,
PUT or PATCH body carrying a key the entity does not declare answers
400 {"error":"unknown_fields","fields":[...]} in every port, before
validation, and writes nothing. drop keeps the old silent behaviour.
Declared server-owned keys (id, readOnly, @autoset, writeOnce on update,
the TPH discriminator, a sibling subtype's column) are still dropped, not
refused, so a client echoing back a row keeps working. Java and Kotlin
check the raw body, so the answer does not depend on the host's Jackson
mapper; a test proves it under both FAIL_ON_UNKNOWN_PROPERTIES values.

The pagination sub-corpus becomes api-settings/ and runs in every port's
generated lane; the core and tph corpora gain reject scenarios. meta init
writes both settings into a fresh config.

* chore(showcase): regenerate for api.unknownFields

* fix(api): code-point order for unknown_fields, every distinct validation issue, a negative limit refused under api.pagination

- unknown_fields lists keys in code-point order in every port (TypeScript and
  C# sorted by UTF-16 code unit, which put a key outside the BMP first).
- A validation 400 keeps two distinct failures of one rule kind on one field
  (Python and C# de-duplicated on path and code); a type error still lists once.
- Under api.pagination a negative limit answers 400 pagination.invalid_value in
  every port instead of reaching the store (SQLite reads LIMIT -1 as no limit).
  New api-settings/limit-negative scenario.
- Python validated-input tests follow api.unknownFields; advanced-modeling
  example regenerated; C# routes generator header names the current contract.

* fix: generated create routes drop server-owned input across ports (1.2.x security) (#568)

* fix: generated create routes store only client-settable fields (1.2.x security)

Python 1.2.1 stopped its generated routes from handing raw request input to
the repository. The same audit found related create-path holes in 1.2.0 in
the other four ports; this closes each in its own idiom. Server-owned values
are dropped silently, never answered with 400.

- Java (codegen-spring): create strips a generated id, readOnly and derived
  fields; a TPH per-subtype create also strips the body discriminator and
  sibling-subtype fields.
- Kotlin (codegen-kotlin): create skips readOnly/derived columns; a TPH
  per-subtype create writes only the route subtype's own columns.
- C# (MetaObjects.Codegen): every readOnly property shape gets a private
  setter; create resets a generated id, the TPH discriminator and M:N
  navigations before Add.
- TypeScript (codegen-ts): the update schema omits primary-key fields, so
  PUT/PATCH can no longer re-key a row with an assigned key.

Proof: new shared api-contract scenarios (core + TPH input-server-owned,
TPH foreign discriminator) and a readOnly `role` field in secret-fields, run
in every port's generated lane and the reference lanes; a new `unset`
assertion key in all five harnesses. In-memory test repositories now store
what they are handed, so the scenarios fail on the 1.2.0 generators.

Proposed versions (not published): npm 1.2.2, NuGet 1.2.2, Maven 8.2.2;
PyPI unchanged at 1.2.1. metamodelVersion unchanged.

* fix: keep a @required readOnly field creatable in C# and Java generated create

Pre-gate review follow-ups to the 1.2.x create-input patch:

- C#: the required-key check skips readOnly fields (the private setter
  never binds them), and create validation ignores a violation naming
  only a @required readOnly member, as Java's SERVER_OWNED_ON_CREATE does.
- Java: the create-validation server-owned set covers every DTO component,
  so a nulled readOnly or derived value-object column no longer 400s.
- TypeScript: drop the now-dead PK guard in the update-schema nullable arm
  and list the PK rule in updateSchemaFields' doc comment.

* no-mistakes(review): apply reviewer inline fixes

* no-mistakes(review): Kotlin readOnly create fix + C# reset skip

* no-mistakes(document): docs: finish stale corpus counts from input fix

* fix(cli): prune emptied skill directories after a --skills-dir move; install every module the Kotlin integration lane needs

meta init --refresh-docs --skills-dir <new> removed the untouched skill files at
the old path but left their directories behind, which read as the old copy still
being there. Walk up from each pruned file and remove the directories it left
empty, stopping at the first that still holds anything and never removing the
skills directory itself.

scripts/integration-test.sh kotlin installed only metadata and codegen-kotlin, so
on an .m2 without the other metaobjects artifacts integration-tests-kotlin failed
to resolve core-spring and om, and codegen-kotlin-exposed1x-check metadata-ktx.

* test(render): hold the email helper in the runtime-drift corpus case

Every generated render path in the five ports already raises
ERR_VAR_NOT_ON_PAYLOAD for a template variable not on the payload
(1.3.0, #520), and runtime-drift/ held the document and prompt helpers.
The @kind: email helper was not in the case. Add WelcomeEmail plus
email-subject/, email-html/ and email-text/ drift directories, one
drifted part each, and check every part raises in the TS, Python, C#,
Java and Kotlin runners.

* feat(init): dotnet meta init and metaobjects init write the api block TypeScript meta init writes

A new project gets api.pagination 50/1000 and api.unknownFields reject in
.metaobjects/config.json from every port's init; an existing config is never edited.

* feat(init): dotnet meta init and metaobjects init also write migrate.foreignKeyIndexes and verify.handEdits

The same new-project keys TypeScript meta init writes since #577.

* feat(api): drop undeclared value-object members everywhere and share the api config cases

- New jsonb scenario jsonb-nested-undeclared-key-dropped: api.unknownFields judges the top
  level only, so a member a value object does not declare is dropped on create and PATCH and
  never stored, while the open jsonb bag keeps every key. The reference servers in every port
  drop such members; the Java generated value-object record now carries
  @JsonIgnoreProperties(ignoreUnknown = true) (it answered 400 invalid_type).
- New shared config corpus api-settings/config-blocks.json (valid and refused api blocks), run
  by the TypeScript, C#, Java and Python config readers. A page size is a positive whole number
  however JSON spells it, at most 2147483647: C# now reads 50.0, TypeScript and Python refuse
  anything above the int32 range.
- CHANGELOG: an Upgrading section (api.unknownFields reject as the one deliberate default change,
  the C# readOnly private setter), init parity across ports, the nested-member rule. Counts,
  READMEs, api-contract.md and the migration guide updated; showcase Java regenerated.

* fix(api): close the code-review findings on the input and page-size work

- C#: with api.pagination set, `limit=0` served the default page; it is now a page of zero rows,
  as in every other port. New shared scenario api-settings/limit-zero (all five ports green).
- C#: the unknown-field check matches a key the way the route binds the body (the app's
  System.Text.Json options; the ASP.NET web default ignores case), so `Title` is the declared
  `title`, not a 400. The verify advisory matches the routes generator by type or exact name,
  not by a "routes" substring.
- Python: a rejected decimal's text is no longer echoed into the 400 issue message; the
  unbounded-list-pages advisory fires only when the routes generator is wired; the dead
  _DECIMAL_COERCE constant is gone.
- Java: UnreadableBody's Javadoc describes the issues envelope it returns.
- Docs: M:N traversal routes take no limit and are not paged by api.pagination (stated as the
  boundary); the C# port doc no longer says dotnet meta init writes no config. Counts updated.

* refactor: read the project config once in the Maven mojo; drop a no-op path coercion in Python issues

Simplify pass: AbstractMetaDataMojo maps its four project settings from one read of
.metaobjects/config.json, and pydantic_issues copies loc as-is (its entries are already int or str).

* no-mistakes(review): Scope ignoreUnknown to request bodies; fix review items

* no-mistakes(review): Drop discriminator on Python TPH update; fix scenario text

* no-mistakes(review): apply reviewer inline fixes

* no-mistakes(review): Fix doc counts, dead guard, stale comments, vacuous assertion

* no-mistakes(review): apply reviewer inline fixes

* no-mistakes(review): Fix stale routes comment in C# api-settings factory

* no-mistakes(review): Fix stale eject docs, vacuous C# check, assertion messages

* no-mistakes(review): Refuse non-numeric C# page bounds with 400

* no-mistakes(review): Refuse out-of-range or negative C# offset

* no-mistakes(review): Drop source-grepping Python router tests

* no-mistakes(review): apply reviewer inline fixes

* test(ts): re-sync the owned zod-validators copy after the pkFields reference change

The input-handling change edited the codegen-ts reference source but not the
owned copy under test-generators, so cli/test/owned-copies-current.test.ts
(the 'owned copies are what meta eject writes' gate) failed: the copy on
disk kept the pre-change update-shape text. bun scripts/sync-owned-template-copies.ts
re-synced 1 of 128 owned copies; no other copy drifted.

* no-mistakes(test): Validate re-synced zod-validators owned copy

* no-mistakes(test): apply changes made during test validation

* no-mistakes(document): Correct init config docs for C# and Python

* test(kotlin): expect table-qualified columns in the TPH create autoSet tests

The TPH per-subtype create now writes every column through the table object
(it[AuthTable.autoCreatedAt]), so a column named body, issues or unknownKeys
cannot be shadowed by the handler's locals. Two KotlinAutoSetStampingTest
cases still asserted the unqualified form and failed the java-slow lane.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant