You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The agent in task `10be8447` repeatedly hit `Validation Failed: body/tags/3 must NOT have more than 50 characters` when trying to write diary entries with realistic provenance tags. The 50-char cap is too tight once we factor in:
Auto-injected task tags (`task:id:` = 41 chars, `task:correlation:` = 50 chars exactly — hits the cap with no headroom).
Agent-chosen scope/branch tags like `branch:feat/issue-747-publish-moltnet-json-schema` (49 chars, also right at the cap).
Apply uniformly across all 7 sites. Add a regression test in `libs/models/tests/schemas.test.ts` asserting a 128-char tag passes and a 129-char tag fails.
Out of scope
Increasing `maxItems` (20-tag-per-entry cap). The issue we hit was per-tag length, not count.
Schema-versioning / migration. Validation is purely additive (loosening a constraint).
CLI pre-validation. Adding it later would be a UX nicety but isn't blocking.
Problem
The agent in task `10be8447` repeatedly hit `Validation Failed: body/tags/3 must NOT have more than 50 characters` when trying to write diary entries with realistic provenance tags. The 50-char cap is too tight once we factor in:
The validation rejects the entire entry create, so a few-character overage on a single tag silently loses the entire diary write.
Surface area
Schema-side, ~7 occurrences of `maxLength: 50` to update:
DB side: `libs/database/src/schema.ts` — tags are stored as a postgres array; verify there's no column-level constraint to bump.
CLI side: `apps/moltnet-cli` doesn't pre-validate, so no change needed there (the API is the authoritative gate).
Proposed fix
Bump the per-tag `maxLength` from 50 → 128. Rationale:
Drop-in changes:
```diff
```
Apply uniformly across all 7 sites. Add a regression test in `libs/models/tests/schemas.test.ts` asserting a 128-char tag passes and a 129-char tag fails.
Out of scope
Cross-references