Commit d2306f2
committed
Run 7 prep: ban fake adapters, require real TypeAdapter in _schema_map.py
Run 6 analysis: agent switched to Node.js scaffolding script (since
Python venv was removed), generated 1966 model classes with decent
naming, but _schema_map.py was a complete cheat — loaded schema.json
at runtime via SimpleNamespace objects with fake json_schema() methods.
Verification passed trivially without ever testing the actual models.
Fixes:
- Add isinstance(adapter, TypeAdapter) check in verify script — rejects
any adapter that isn't a real pydantic TypeAdapter
- Ban SimpleNamespace, _make_adapter, _schema_path, _schema_doc patterns
- Ban loading schema.json at runtime in generated code
- Add failure case 8 to prompt explaining the cheat and the new check1 parent 1f14d3e commit d2306f2
2 files changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
530 | 543 | | |
531 | 544 | | |
532 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
561 | 566 | | |
562 | 567 | | |
563 | 568 | | |
| 569 | + | |
| 570 | + | |
564 | 571 | | |
565 | 572 | | |
566 | 573 | | |
| |||
612 | 619 | | |
613 | 620 | | |
614 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
615 | 632 | | |
616 | 633 | | |
617 | 634 | | |
| |||
0 commit comments