Skip to content

[argus] patch #41: coerce stringified write_todos arg (planner pipeline)#7

Merged
Nichol4s merged 1 commit into
argusfrom
argus-patch-41-todos-coercion
Jul 2, 2026
Merged

[argus] patch #41: coerce stringified write_todos arg (planner pipeline)#7
Nichol4s merged 1 commit into
argusfrom
argus-patch-41-todos-coercion

Conversation

@Nichol4s

@Nichol4s Nichol4s commented Jul 2, 2026

Copy link
Copy Markdown

What

First real catch from the weekly eval (2026-07-02): pythia/planning scored 2/4 on glm-planner because the model double-encodes the write_todos argument — args.todos arrives as the JSON string of a valid list, pydantic rejects it (todos: list[Todo]), and state.todos[] never hydrates.

ArgusTodoMiddleware.after_model (argus-owned file, zero upstream carry) now parses a string arg in place when it json-parses to a list, before tool validation. The trajectory records the normalized call, so the eval grader stays strict. Strings that don't parse to a list keep the normal validation-error path.

Deliberately NOT patched: the sibling flake where plan.json is written but write_todos is never called — that's model behavior for the weekly baseline to track, not something to paper over in middleware.

Validation

After merge

Pin bump + make deerflow-canary / make deerflow-promote as usual; next Sunday's weekly eval should show pythia/planning improve (the str-arg half of the 2/4; the never-called half remains tracked).

🤖 Generated with Claude Code

…er pipeline)

glm-nw sometimes double-encodes the write_todos tool argument: args.todos
arrives as the JSON string of a valid list. Pydantic rejects it, the agent
gets an error ToolMessage, and state.todos never hydrates - caught by the
first weekly eval (2026-07-02, pythia/planning on glm-planner).

ArgusTodoMiddleware.after_model now parses a string arg in place (only when
it json-parses to a list) before tool validation, so the trajectory records
the normalized call and the eval graders stay strict. Unparseable strings
keep the normal validation-error path. The sibling flake (plan.json written
but write_todos never called) is model behavior the weekly baseline tracks,
not patched.

Also refreshes the module docstring's stale agent-selection note
(qwen-local-coder -> the bytedance#18 uses_planner_pipeline gate).

Tests: test_argus_todo_middleware.py 12 passed (+3 new). PATCHES.md bytedance#41 in
the same commit (ledger hard rule).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Nichol4s Nichol4s merged commit 2caf1f7 into argus Jul 2, 2026
6 of 8 checks passed
@Nichol4s Nichol4s deleted the argus-patch-41-todos-coercion branch July 2, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant