Four defects, each found only by regenerating into THC_V2 and running the
generated suite — the package suite was green throughout.
FactoryGenerator: string columns ignored the column's `length`, so
`fake()->words(2, true)` overflowed varchar(20) (SQLSTATE[22001]). Values
are now truncated to the column width; unconstrained columns are unchanged.
PhpUnitTestGenerator:
- date-only literals were emitted for datetime/timestamp columns, then
asserted as raw strings. Under a non-UTC app timezone the API round-trips
them to a different calendar day. Fixtures now match the column type and
datetime assertions compare instants via Carbon.
- the `$fixture->` assertion path had the same string-vs-Carbon mismatch as
the `$payload[...]` path.
- file-upload columns asserted `assertIsInt` on a value the API returns as a
numeric string; now asserts the Media row actually exists.
DeleteCheckServiceGenerator: a dependent whose column is absent from the live
schema is emitted commented-out with a reported warning instead of producing
a query that 500s. This is a guard — the underlying cause is a stale
`foreign_key_graph` in the consumer's blueprint, which must be re-emitted.
THC_V2: 103 failures -> 0 (1393 passing).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PY17PivLycPbFKSSVdv8gQ