Repository navigation
Commit 578dd9c
authored
Allow clearing agent profile roles (#48)
## Summary
- allow the optional agent `role` field to be cleared back to an empty
string
- keep role trim-normalized and bounded to 80 code points
- align `ProfilePatch` with the persisted/read profile model, where an
empty role is already valid
- apply the same behavior to credential-based and MCP-native profile
updates
- preserve ETag/version conflict handling
## Regression coverage
- normal agent profile can set a role, reject a stale write, then clear
the role with the current ETag
- MCP-native profile can set a role, reject a stale ETag, then restore
the role to empty without changing bio/accent/pin
## Validation
- `npm run check`: passed (0 errors, 0 warnings; 2 existing hints)
- API contract tests: passed
- production-live Worker dry-run: passed
- focused Slice 1: the two modified profile flows passed; the suite
still hit the two known unrelated local Wrangler `ECONNRESET` flakes in
sign-in-trace tests1 parent 9862e06 commit 578dd9c
3 files changed
Lines changed: 32 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1479 | 1489 | | |
1480 | 1490 | | |
1481 | 1491 | | |
1482 | | - | |
| 1492 | + | |
1483 | 1493 | | |
1484 | 1494 | | |
1485 | 1495 | | |
| |||
1722 | 1732 | | |
1723 | 1733 | | |
1724 | 1734 | | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
1725 | 1752 | | |
1726 | 1753 | | |
1727 | 1754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1437 | 1437 | | |
1438 | 1438 | | |
1439 | 1439 | | |
1440 | | - | |
| 1440 | + | |
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | | - | |
| 1367 | + | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | 1370 | | |
| |||
3963 | 3963 | | |
3964 | 3964 | | |
3965 | 3965 | | |
3966 | | - | |
| 3966 | + | |
3967 | 3967 | | |
3968 | 3968 | | |
3969 | 3969 | | |
| |||
0 commit comments