Repository navigation
Conversation
Every agent call appended an entry to the run item's agents list. A run can
last 45 minutes with a fan-out of 8, so a few hundred calls together with
200 log lines of CJK text and a 24,000-character result could pass
DynamoDB's 400 KB. The append then failed and took the run down with it.
Each agent call is now its own item in the run's partition
(PK=PIPELINERUN#<id>, SK=AGENT#<ts>#<rand>). The run item gets atomic
agents_total and cost_usd_total counters and keeps the first 100 calls as a
preview, enforced by a size() condition, so run lists cost the same as
before. GET /pipeline-runs/{id} returns every call. When a run ends, its
per-phase stats are computed over all calls and stored as phases_summary,
and the Insights summary view reads that. The result and logs are capped in
UTF-8 bytes (72 KB and 96 KB) instead of characters.
The Pipeline page loads a large run's full call list when its card is
opened, and shows the exact cost total.
Service-entry results were capped at 200,000 characters, up to 600 KB of
CJK. The final write could then fail, and the poller saw a successful call
as failed. They are now capped at 300,000 bytes, with result_truncated
reported to the caller.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 10, 2026
Contributor
|
Thanks! This change is included in #66 (published together with the related platform fixes). This repository is now updated by snapshot PRs only, so closing this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two record types could grow past DynamoDB's 400 KB item limit, and in both cases the failure surfaced as something else.
Pipeline runs.
agent()calllist_appended an entry, about 300–400 bytes, onto the run item.Service-entry results.
resultwas capped at 200,000 characters, which is up to 600 KB of CJK.update_itemthen failed and the worker recorded the invocation asfailed. The caller polling for the answer of a successful call got a failure.Change
Pipeline runs
PK=PIPELINERUN#<run_id>, SK=AGENT#<ts>#<rand>.agents_totalandcost_usd_totalcounters, and keeps the first 100 calls as a preview, enforced by asize(agents) < :capcondition. Run lists therefore cost the same as before and still show calls inline.GET /api/v1/pipeline-runs/{id}returns every call.phases_summary. The Insightsview=summaryreads that instead of the preview. Running runs and runs recorded before this change fall back to the inline list, exactly as before.Service-entry results
result_truncatedreturned to the caller. This is documented indocs/user-guide.md.There are no Terraform or IAM changes; the backend already has
PutItem/Queryon the table.Test plan
backend/tests/test_item_size_limits.py, 5 tests:phases_summarycovers every call.succeeded.ADDcounters with aDecimalcost, the conditionallist_appendwithsize(), and the nestedphases_summaryupdate. The preview stopped at 100, 130 rows were stored, and the cost totals and phase counts were exact.tsc -bandvite buildpass.ruffreports no new findings on the changed files.pipeline_service.pyis also touched by #52 and #53, in different functions. A trivial rebase may be needed depending on merge order.This came out of an inventory of DynamoDB access patterns done for the #44 review. It is independent of #44.
🤖 Generated with Claude Code