Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

### Changed

- **Internal: removed a dead `rowIndex` parameter from the settled-scene row projector.** `attachLiveStream`'s `pushRow` helper carried an unused positional index left over from before final-segment eligibility moved to a row-identity `WeakSet`; dropping it is a pure no-op refactor (differential execution confirms byte-identical settled scenes — ordering, dedupe, final-prefix suppression, and sequence assignment all unchanged). Thanks @webtecnica. (#6258)

- **Docs: reconciled the assistant-reply lifecycle RFCs/contracts with shipped behavior.** The Stable Assistant Turn Anchors and Live-to-Final RFCs, `docs/CONTRACTS.md`, and the Phase 0 architecture inventory were updated from "proposed/scaffold" framing to "accepted/implemented" to match what actually ships (single assistant-turn owner projecting one `activity_scene_v1` into Compact Worklog / Transparent Stream / Final answer). Documentation-only — no runtime behavior or CI-gate change; the one code touch is a corrected comment header in `static/assistant_turn_anchors.js`. Remaining hardening stays tracked under #3400. Thanks @franksong2702. (#6144)

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions static/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3586,7 +3586,7 @@ function attachLiveStream(activeSid, streamId, uploaded=[], options={}){
if(idx>lastProjectedToolIndex&&row&&row.role==='prose'&&row.kind==='process_prose'&&String(row.source_event_type||'')==='token'&&String(row.local_id||'').startsWith('live-prose:')) finalSegmentLiveProseRows.add(row);
});
const rowIsLiveTokenFinalPrefix=(row,textKey,finalSegmentEligible)=>finalSegmentEligible&&row&&row.role==='prose'&&row.kind==='process_prose'&&String(row.source_event_type||'')==='token'&&String(row.local_id||'').startsWith('live-prose:')&&textKey&&finalKey&&textKey.length<finalKey.length&&finalKey.startsWith(textKey);
const pushRow=(row,rowIndex)=>{
const pushRow=(row)=>{
if(!row||typeof row!=='object') return;
const finalSegmentEligible=finalSegmentLiveProseRows.has(row);
row=_anchorSceneSettleLiveRunningRow(row,hasSettledThinking);
Expand All @@ -3607,7 +3607,7 @@ function attachLiveStream(activeSid, streamId, uploaded=[], options={}){
seq:rows.length,
});
};
orderedRows.forEach((row,idx)=>pushRow(row,idx));
orderedRows.forEach((row)=>pushRow(row));
const scene={
...base,
version:'activity_scene_v1',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_live_to_final_anchor_visible_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def test_settled_anchor_scene_preserves_live_projected_order_before_backfill():
projected_push_idx = complete.index("orderedRows.push(row);", ordered_idx)
backfill_idx = complete.index("for(let idx=turnStart+1;idx<=lastAsstIndex;idx+=1)", projected_push_idx)
terminal_idx = complete.index("if(row&&row.role==='terminal') orderedRows.push(row);", backfill_idx)
replay_idx = complete.index("orderedRows.forEach((row,idx)=>pushRow(row,idx));", terminal_idx)
replay_idx = complete.index("orderedRows.forEach((row)=>pushRow(row));", terminal_idx)
assert projected_idx < ordered_idx < projected_push_idx < backfill_idx < terminal_idx < replay_idx

assert "const seenTextKeys=[];" in complete
Expand Down
Loading