Found while validating the llms.txt AI-bootstrap flow end to end (CLI 3.8.58, tina4-python 3.13.87, Python 3.14.5). Reproduced independently twice, with both generate model and generate crud.
Repro
tina4 init python todoapi && cd todoapi
tina4 generate crud Todo
Expected
The generated migration creates every column the generated model declares.
Actual
Model (src/orm/Todo.py):
id = IntegerField(primary_key=True, auto_increment=True)
name = StringField()
created_at = DateTimeField()
Migration (migrations/<ts>_create_todo.sql):
CREATE TABLE IF NOT EXISTS todo (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
);
name is absent. After tina4 migrate, the first authenticated write fails:
POST /api/todos -> HTTP 500
[ERROR] Todo.save() failed for table "todo": table todo has no column named name
[ERROR] Route error: "bool" object has no attribute "to_dict"
Two defects stacked
- The generator drops the model's declared fields from its DDL.
generate auth does NOT have this bug (the users table is complete), so it looks specific to model/crud generation.
- The generated route does
item = Todo.create(...) then item.to_dict() with no check that create() succeeded, so a clean DB error surfaces as an unrelated AttributeError. The 500 hides the real cause.
Why this is high priority
https://tina4.com/llms.txt tells AI assistants to build REST APIs via generate auth + generate crud <Name>. That documented path currently 500s on the first write. I have added a temporary warning to llms.txt; it should be removed once this is fixed.
Per the parity rule this needs checking on php/ruby/nodejs generators too.
Found while validating the
llms.txtAI-bootstrap flow end to end (CLI 3.8.58, tina4-python 3.13.87, Python 3.14.5). Reproduced independently twice, with bothgenerate modelandgenerate crud.Repro
Expected
The generated migration creates every column the generated model declares.
Actual
Model (
src/orm/Todo.py):Migration (
migrations/<ts>_create_todo.sql):nameis absent. Aftertina4 migrate, the first authenticated write fails:Two defects stacked
generate authdoes NOT have this bug (the users table is complete), so it looks specific to model/crud generation.item = Todo.create(...)thenitem.to_dict()with no check thatcreate()succeeded, so a clean DB error surfaces as an unrelatedAttributeError. The 500 hides the real cause.Why this is high priority
https://tina4.com/llms.txttells AI assistants to build REST APIs viagenerate auth+generate crud <Name>. That documented path currently 500s on the first write. I have added a temporary warning to llms.txt; it should be removed once this is fixed.Per the parity rule this needs checking on php/ruby/nodejs generators too.