feat(agent-builder): raise prompt-hint clamp to 350#1139
Conversation
Raise the client-side clamp (maxHintLength) from 240 to 350 so hints up to the new backend cap aren't truncated in the composer. Clamp test now feeds a 400-char hint and asserts 350. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jp2NeQiZiBavQCgyPZVZKd
|
Claude finished @saulmc's task —— View job Code Review Complete ✅Tasks
Review SummaryThis is a clean, well-coordinated change raising the prompt hint character limit from 240 to 350. The implementation is correct and follows project conventions. ✅ Strengths1. Consistency Across Changes
2. Code Quality
3. Documentation
🔍 ObservationsNo Issues Found - The change is technically sound:
Backwards Compatibility Note (already documented in PR description):
📋 Test CoverageThe test suite properly validates:
The updated test at line 68-74 properly validates the new behavior with: let long = String(repeating: "x", count: 400)
// ...
XCTAssertEqual(model.hints.last?.count, 350, "Hints are clamped to the 350-char contract")🎯 RecommendationsNo Changes Required - This PR is ready to merge once:
Security & Performance
Verdict: Approve ✅ - Clean implementation, well-tested, properly documented. |
ApprovabilityVerdict: Approved Simple constant change raising the prompt hint character limit from 240 to 350. Updates are limited to the constant value, documentation comments, and corresponding test assertions with no new logic or behavior changes. You can customize Macroscope's approvability policy. Learn more. |
Raise the client-side prompt-hint clamp from 240 to 350 (
PromptHintsModel.Constant.maxHintLength) so served hints up to the new backend cap aren't truncated in the composer. Doc comments updated; the clamp test now feeds a 400-char hint and asserts a 350-char result.Part of a coordinated 4-repo change raising the curated dice prompt-hint cap 240→350. The backend PR is the gate and should merge first. Note: already-shipped app builds keep clamping to 240, so hints of 241–350 chars truncate there until users update.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Jp2NeQiZiBavQCgyPZVZKd
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Raise
PromptHintsModelhint clamp limit from 240 to 350 charactersUpdates
PromptHintsModel.Constant.maxHintLengthfrom 240 to 350 to match the updated backend contract. Documentation in ConvosAPIClient+Models.swift is updated to reflect the new limit, and tests in PromptHintsModelTests.swift are adjusted accordingly.Macroscope summarized f72197f.