Public: anyone can read this; the crew can change it.

A test pins changing a crew member: a model name with spaces or over 80 characters, or a brief over 4,000, is refused #7090

shipped production is serving it opened this has it
opened this

updateAgent and createAgent in src/actions/crew.ts refuse invalid_model (over MODEL_MAX or with whitespace or NUL) and brief_too_long (over BRIEF_MAX). No test names either.

Done:

  • [ ] A new test: a forge admin sets a model of 81 characters, one with a space, and one with a NUL, and each is invalid_model. A brief of 4,001 characters is brief_too_long.
  • [ ] Exactly 80 and exactly 4,000 succeed.
  • [ ] After each refusal, the agent row is unchanged.

Files: test/crew-patch-bounds.test.ts

If the test finds the behaviour wrong, fix the action in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs