You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2a1877a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/implementation/read-only-review.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,3 +92,7 @@ PR #11 review round 3 reproduced retrying a locally active job after its persist
92
92
PR #11 review round 4 reproduced new question work entering during shutdown. Questions now marks itself closing synchronously before cancelling/draining jobs; start rejects before any store write or agent invocation, during and after shutdown. The regression failed before the guard and checks that the unstarted note has no attempt recorded.
93
93
94
94
PR #11 round 5 confirmed the shutdown fix and made the timeout-summary concern concrete: the CLI adapter replaced the abort reason with generic cancellation. Direct adapter regressions reproduced this for timeout and shutdown reasons. The adapter now preserves Error-valued abort reasons; provider launch errors remain sanitized.
95
+
96
+
PR #11 round 6 reproduced releasing a concurrency slot while a cancelled invocation was still unsettled. Cancellation now persists the visible failure promptly but retains the job until the invocation settles; retries remain blocked and shutdown awaits it. The CLI adapter defers rejection and temporary-directory cleanup until child close, including abort and output-limit failures. Regressions cover late settlement and abort-error-before-close ordering. Injected agents must settle after cancellation; production adapters terminate with SIGKILL and await closure.
97
+
98
+
The review's polling-efficiency observation is tracked separately in issue #12: answer polling currently rebuilds the full review, and the follow-up will measure and remove that work while preserving snapshot metadata and stale-response protection.
child.stdout.on('data',(chunk:Buffer)=>{bytes+=chunk.length;if(bytes>1024*1024){child.kill('SIGKILL');reject(newError('Agent output exceeded its limit.'));}elsechunks.push(chunk);});
child.stdout.on('data',(chunk:Buffer)=>{bytes+=chunk.length;if(bytes>1024*1024){failure??=newError('Agent output exceeded its limit.');child.kill('SIGKILL');}elsechunks.push(chunk);});
child.on('error',error=>reject(signal.aborted&&signal.reasoninstanceofError ? signal.reason : newError(signal.aborted?'Agent cancelled.':`Could not start ${provider}. Check that its CLI is installed and signed in. (${error.name})`)));
25
-
child.on('close',code=>code===0?resolve(Buffer.concat(chunks).toString('utf8')):reject(newError(`${provider} exited with status ${code}. Check its login and usage limits.${/auth|login|sign.in/i.test(diagnostic)?' Authentication may be required.':''}`)));
24
+
child.on('error',error=>{failure=signal.aborted&&signal.reasoninstanceofError ? signal.reason : newError(signal.aborted?'Agent cancelled.':`Could not start ${provider}. Check that its CLI is installed and signed in. (${error.name})`);});
25
+
child.on('close',code=>failure?reject(failure):code===0?resolve(Buffer.concat(chunks).toString('utf8')):reject(newError(`${provider} exited with status ${code}. Check its login and usage limits.${/auth|login|sign.in/i.test(diagnostic)?' Authentication may be required.':''}`)));
if(this.running.size>=2){this.service.store.finishAnswer(this.service.config.identity,id,attempt,{status:'failed',error:'Two questions are already running. Retry when one finishes.'});return;}
asyncclose(){this.closing=true;for(constjobofthis.running.values())job.controller.abort(newError('Server stopped. Retry the question.'));awaitPromise.all([...this.running.values()].map(job=>job.done));}
awaitpage.goto(app.url);awaitpage.getByLabel('Question about this item').fill('First question');awaitpage.getByRole('button',{name:'Ask agent',exact:true}).click();awaitexpect(page.getByText('Agent · Answering…',{exact:true})).toBeVisible();
functionquestion(service:ReviewService){constview=service.load();constsegment=view.segments.find(s=>s.row==='P1'&&s.operation==='+')!;returnservice.act({action:'note',item:'P1',kind:'question',text:'Why cap the retry delay?',reference:{key:segment.key,start:segment.newLine,end:segment.newLine},token:view.token});}
15
16
it('persists answers with plan, code, selected snippet and prior conversation context',async()=>{
@@ -30,7 +31,7 @@ it('fails visibly and retries without duplicating the question or accepting stal
0 commit comments