Repository navigation
Skip non-object Harbor ATIF artifacts - #1794
Open
GoldArowana wants to merge 1 commit into
Open
GoldArowana wants to merge 1 commit into
GoldArowana wants to merge 1 commit into
Conversation
Contributor
|
The docs for this pull request built successfully. A maintainer can publish a preview of this commit by adding the |
This branch has not been deployed
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
If an external
agent/trajectory.jsoncontains valid JSON with a non-object root,load_tracecurrently treats it as ATIF and skips the available Pi session. Reconciliation then raisesAttributeErrorbefore it can compare the captured turns.Treat non-object JSON like the other unusable native artifacts the loader already handles. Keep the native ATIF object first, and leave the token comparison unchanged.
Type of Change
Alignment Checklist
RFC Status
Test Plan
trajectory.jsoncontaining[]with a valid Pi session. The base raisesAttributeError. The candidate selects the Pi session and reconciles. A valid native ATIF trace still wins over Pi, and a native token mismatch still fails reconciliation.PYTHONPATH=src:envs uv run pytest tests/envs/test_harbor_reconcile.py -v --tb=shortpassed 54 tests. The official CPU command passed 6,590 tests on Python 3.12.12, with 149 skips, 129 deselections, and 23 subtests passed. The candidate source was checked before and after execution. Exact-head validationReview
Codex assisted with implementation and testing. A separate Codex reviewer reran the failing case and eight preservation controls on the exact base and head and found no blocking issue. The test uses an invalid external artifact fixture with the real Pi session format and no live model calls.
Note
Low Risk
Narrow loader guard with fallback to existing Pi session path; dict ATIF unchanged. Low risk to reconciliation semantics.
Overview
load_atifnow returnsNonewhenagent/trajectory.jsonparses but its root is not a JSON object (arrays, strings, booleans, numbers, ornull). That matches how other unusable artifacts are handled, soload_tracecan fall back to the Pi session instead of passing a non-dict into reconciliation (which previously raisedAttributeError).Valid dict-shaped ATIF still wins over Pi; token comparison behavior is unchanged. A parametrized test covers several non-object roots and expects Pi-session reconciliation to succeed.
Reviewed by Cursor Bugbot for commit 3c1c9ea. Bugbot is set up for automated code reviews on this repo. Configure here.