* fix(transparent-stream): remove dead rowIndex param from pushRow (#6189 follow-up) In #6189 / #6217 the final-segment eligibility was migrated from an index comparison (rowIndex > lastNonTerminalWorkRowIndex) to a WeakSet lookup (finalSegmentLiveProseRows.has(row)). The rowIndex parameter on pushRow became dead code — it's declared but never read, and the call-site still passes idx from forEach. Remove the unused parameter and simplify the call-site. This addresses the greptile review feedback on the original PR. Closes #6189 * CHANGELOG: dead rowIndex param removal (#6258) --------- Co-authored-by: webtecnica <webtecnica@users.noreply.github.com> Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
This commit is contained in:
parent
c4284529b0
commit
c9deb980c1
3 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue