Repository navigation
feat: adapter own-timeout + usage parsing, A20 baseline runner - #409
Merged
Merged
Conversation
- fusion_code_agent_external.py: enforce an own agent timeout (default 870s, FUSION_CODE_TB2_AGENT_TIMEOUT_S) slightly below harbor's cap so run() returns instead of being cancelled by AgentTimeoutError — the verifier still runs and metrics survive; parse the stream-json result event into AgentContext (n_input/n_output/n_cache_tokens + per-model modelUsage; input_tokens includes cache reads per fusion-code schema). Verified against a real S1 result event. - run-a20.sh: sequential A20 baseline runner over the frozen subset (single 27B engine, concurrency 1), per-task repo-path/image detection from task.toml + Dockerfile WORKDIR, image-pull wall time recorded separately from agent wall time per the census note. Co-Authored-By: Claude Code <[email protected]>
This was referenced Nov 30, 2026
Merged
dahai80
added a commit
that referenced
this pull request
Dec 1, 2026
Survey addendum item (cost-per-task): per-trial wall seconds from started_at/finished_at, wall column per row, wall stats + token cost per resolved task in the summary. Verified against existing S1 job dirs (usage fields absent there = 0, expected for pre-#409 runs). Co-authored-by: Claude Code <[email protected]>
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.
Summary
FUSION_CODE_TB2_AGENT_TIMEOUT_S), just below harbor's 900s agent cap. In S1 run 8 the agent finished its work but harbor'sAgentTimeoutErrorcancelledrun()itself, so the verifier metrics pipeline was entered through an exception and token usage was lost. With the own timeout,run()returns normally, usage gets parsed, and the verifier runs cleanly.resultevent intoAgentContext—n_input_tokens/n_output_tokens/n_cache_tokensplus per-modelmodelUsage(harborModelUsageschema:n_input_tokensincludes cached tokens, matching fusion-code'susage.input_tokens). Unit-verified against a real S1 result event (163236 in / 6723 out).run-a20.sh): sequential runs over the frozen 20-task subset (single 27B engine, concurrency 1), per-task image + repo-path detection fromtask.toml/ DockerfileWORKDIR, image-pull wall time recorded separately from agent wall time.Test plan
python3 -m py_compile+ import under harbor's interpreter_populate_usageunit-tested against a real S1 result eventbash -n run-a20.shbun test1892 pass / validator ERROR 0 on the same tree (main-based)🤖 Generated with Claude Code