fix(assign-to-workforce): keep truncate() within MAX_SUMMARY_LEN (#77)#78
Conversation
|
/agentic_review |
Code Review by Qodo
1.
|
`truncate()` sliced MAX_SUMMARY_LEN chars and *then* appended the 3-char ellipsis, so a truncated Task-summary cell rendered at 75 chars — 3 over the cap the constant is meant to enforce. Since the split-plan table's column widths are computed from actual cell content, this widened the rendered table past its stated budget. Reserve room for the ellipsis and clamp the result so the rendered cell (ellipsis included) never exceeds MAX_SUMMARY_LEN — the trailing `[:MAX]` clamp also upholds the contract in the degenerate MAX_SUMMARY_LEN <= len(ELLIPSIS) config (Qodo, PR #78 review). Update the integration test, which previously pinned the buggy 75-char expectation, and add a `len(cell) <= MAX_SUMMARY_LEN` assertion to lock the contract. Also gitignore `.eidetic/` (a repo-local eidetic memory store is stray runtime state; the canonical store lives at ~/.eidetic). Origin skill (broadcast to the mesh via guildmaster) — fixing at source so downstream verbatim copies pick it up on next refresh rather than patching per-copy.
f681693 to
2be54cd
Compare
|
|
Re: "Committed eidetic local state" — valid, and it was broader than the one file flagged. A stray
All three are removed from the PR (branch amended + force-pushed) — the diff now touches only the six fix-related files. I also added
|



What
Fixes #77 —
truncate()inassign-to-workforce.sh's split-plan rendererreturned a string
len(ELLIPSIS)(3) chars longer thanMAX_SUMMARY_LENwhenever it truncated:
Because the table's column widths are computed from actual cell content
(
max(len(...))), a truncated Task-summary cell widened the rendered table to75 chars — overshooting the 72-char budget the constant is meant to enforce.
Presentation-only, but it made
MAX_SUMMARY_LENmean something other than whatit says.
Fix
Reserve room for the ellipsis so the rendered cell (ellipsis included) stays
within the cap:
tests/test_assign_to_workforce_script.pypreviously pinned the buggy75-char expectation — updated to the corrected slice, plus a module-level
len(_EXPECTED_TRUNCATED) == 72guard and an inlinelen(truncated_cell) <= MAX_SUMMARY_LENassertion that locks the contract soa future regression fails loudly. Stale docstring wording ("past 72 chars")
corrected to "to within 72 chars".
0.19.0 → 0.19.1+ CHANGELOG entry.Verification
uv run pytest -n auto— 616 passed.flake8/black --check/isort --check-onlyclean;markdownlint-cli2clean on
CHANGELOG.md;agex pr lint— no violations.Propagation note
assign-to-workforceis a devague origin skill (broadcast to theAgentCulture mesh via guildmaster, cite-don't-import). Fixing at source means
downstream verbatim copies (rollout-cli, etc.) pick this up on their next
refresh rather than being patched per-copy — exactly as the reporter intended
by filing here. No sibling follow-up PR needed.