Repository navigation
fix(tier3): skip non-object events when rebuilding agent logs - #728
Conversation
Signed-off-by: Afloat <ShuffleMonkey@163.com>
chrisknvidia
left a comment
There was a problem hiding this comment.
Thanks, this is worth having. I confirmed on main that a single null or [] line in claude-code.txt or cline.txt, or a Cline say: tool event whose text decodes to a number or string, raises AttributeError, and since load_trajectory_with_fallback and its callers do not catch it the whole trial load aborts rather than just losing that line. The new guards match what the OpenCode and Codex parsers already do, and skipping quietly is consistent with how a non-JSON line is already handled right above. The existing log converter tests give the same results before and after, and the 17 new cases fail on main and pass here. One nit on the CHANGELOG formatting inline; otherwise good to go.
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
rng1995
left a comment
There was a problem hiding this comment.
Thanks, @Afloat16, for making Claude/Cline log reconstruction tolerate non-object JSON events and Cline tool payloads. The guards skip malformed records while preserving valid surrounding tool calls and results, including through the fallback loader. I found no new actionable issues on this head.
Validation: 45 focused event-shape and existing log-converter tests passed.
rng1995
left a comment
There was a problem hiding this comment.
Thanks @Afloat16 for this contribution! I reviewed b1d5f91181. I reproduced the problem on main, confirmed this change fixes it, checked that the new tests fail on main, and ran the new and related tests on this head (all pass). I left 1 inline comment (1 P3); please take a look.
Merge current main while retaining this change and the published release notes. Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
Moved this fix into the current Unreleased section. Commit 8589364 resolves the changelog conflict, keeps the Fixed list contiguous, and leaves main's published release notes unchanged. The existing production and test blobs are unchanged. Hosted workflows await maintainer approval. |
Resolve the Unreleased changelog conflict while retaining both entries. Preserve the reviewed PR implementation and published release history. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Head branch was pushed to by a user without write access
Resolve the CHANGELOG.md conflict by retaining both the existing PR entry and the upstream scanner-install entry. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
@Afloat16 - Please resolve merge conflict to merge the PR. |
Synchronize with NVIDIA/SkillEvaluator main f867b7f. Retain this PR's entry under Unreleased and preserve published release history. Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
Resolved the merge conflict in The implementation and regression-test patch has the same stable patch ID before and after synchronization. On the exact merged tree, 45 focused tests passed (Linux, Python 3.12.14); full-source Ruff, changed-file formatting, and Hosted checks on this head have completed: 21 successful, 2 skipped, no failures. The CI workflow passed. |
CHANGELOG.md: keep main's Unreleased section unchanged and list this fix first under Unreleased > Fixed, directly above main's trajectory-recovery entry. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolve the CHANGELOG.md conflict by keeping main's entries and this change's entry under Unreleased. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Resolve the CHANGELOG.md conflict by keeping main's entries and this change's entry under Unreleased. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Thanks @Afloat16 for this contribution! I re-checked 320c70038: I merged current main into the branch (the only conflict was CHANGELOG.md, resolved by keeping main's entries and this entry under Unreleased), confirmed that every earlier review comment is addressed in the code, and ran this PR's tests and ruff, which pass. I found nothing new. Approving.
Preserve the log recovery entry under Unreleased alongside current main. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Verified the refreshed head and the Click help-test isolation fix. The focused CLI and log-recovery suites passed all 206 tests, and Ruff and diff checks passed.
Summary
Claude Code and Cline log reconstruction already skips non-JSON noise, but valid JSON values such as
null, arrays, booleans, numbers and strings reach.get()without an object check. A single such line raisesAttributeErrorand prevents recovery of valid tool evidence around it. Cline has the same issue inside the JSON-encodedsay: toolpayload.Skip these non-event values before reading event fields. Valid events, tool-result pairing and fallback source selection retain their existing behavior, matching the object checks already present in the OpenCode and Codex parsers.
Merge and current verification
At
fa71312fb83ac6c36be3095457bbef6e6f81c52e, merged upstream main3ecd69bd7fb189df064821ea637f99ba4a2007d7. The only conflict was inCHANGELOG.md; both this PR's release note and the upstream scanner-install note are retained. This PR's production code and tests are byte-for-byte unchanged fromce805c7ffaf5388d0c048bc44b21ad7818c1110f.Re-ran the log-event-shape, log-converter and Harbor collector-runtime-failure test modules listed below: 244 passed on Linux with Python 3.12.14. Also passed
python -m ruff check src tests, Ruff formatting for the changed Python files, the OSS boundary check, andpython -m build(wheel and sdist). Hosted workflows for this merge commit await maintainer approval.Original verification
All 17 new cases fail on unchanged base
8fe9723. The tests compare reconstructed trajectories with clean-log equivalents, including tool calls and observations, cover five non-object JSON types and nested Cline tool payloads, and exercise both file-based fallback paths.python -m pytest tests/tier3/test_log_event_shapes.py tests/tier3/test_log_converters.py tests/test_harbor_collector_runtime_failures.py -q— 230 passed.make lintequivalent:python -m ruff check src testsmake testdid not complete successfully in this environment (see below)make buildequivalent:python -m build(wheel and sdist)The unchanged base
8fe9723, tested withpython -m pytest -x -q, stops after 456 passed and 19 deselected attests/ci/test_gateway_benchmark_workflows.py::test_gitlab_enriched_tier1_applies_the_keyless_job_baselines[extra0-expected0]. The sandbox has no/tmp, while that workflow fixture explicitly invokesmktemp -d /tmp/skillevaluator-enriched-tier1.XXXXXX. The same test fails for the same reason on the retry branch. No full-suite pass is claimed.Release Impact
CHANGELOG.mdCurrent CI baseline (2026-11-22)
At head
320c700382224f3474e9762592c5830ff713b852, the Python 3.12 CI job failstests/test_cli_banner.py::test_noninteractive_invocations_preserve_streams_and_exit_codes[args2-0-stdout]:-hexits 2 instead of 0.The same failure reproduces on pristine upstream main
4964c8b301cadbc121e126c268d06e201047133c, using the frozen dependency lock with Python 3.12.14 and Click 8.4.2. Running these existing tests in this order gives 1 passed, 1 failed:python -m pytest -q tests/test_cli.py::test_help_emits_color_when_enabled 'tests/test_cli_banner.py::test_noninteractive_invocations_preserve_streams_and_exit_codes[args2-0-stdout]'The first test renders help using a bare
click.Context(cli, ...), which initializes the shared command's cached help option with only--help. The following-hinvocation then reportsNo such option '-h'. This isolates an upstream test-order dependency; the full CI suite is not green.