test: address Codex review of property tests (PR 3)

- llm: generator now emits finish chunks (the finish-defaults property was
  vacuously green); add a property asserting streaming and one-shot assembly
  agree on usage and finish
- agent-loop: assert the synchronous burst batches into exactly one turn; add
  a mixed-schedule property (send/settle interleavings); recordStatus returns
  its disposer; per-run timeouts so a hang loses no seed
- session: randomize the noise/message interleaving (was a fixed alternation)
- tools: exclude non-finite doubles from generated numeric args (JSON-real)
This commit is contained in:
Tianyi Cui
2026-06-14 00:24:23 +08:00
parent 2f6d3b8539
commit 7b07b70750
4 changed files with 91 additions and 23 deletions

View File

@@ -47,7 +47,7 @@ function specArb(depth: number): fc.Arbitrary<SchemaSpec> {
function valueForProp(prop: SchemaProp): fc.Arbitrary<unknown> {
switch (prop.type) {
case 'string': return prop.enum ? fc.constantFrom(...prop.enum) : fc.string()
case 'number': return fc.double({ noNaN: true })
case 'number': return fc.double({ noNaN: true, noDefaultInfinity: true })
case 'boolean': return fc.boolean()
case 'object': return prop.properties ? validArgsForSpec(prop.properties) : fc.constant({})
case 'array': return prop.items ? fc.array(valueForProp(prop.items), { maxLength: 3 }) : fc.constant([])