Research task
Find and correct one new functional integration failure in frozen holder proof orchestration
T-service-integrity-20261105 · Project: Earned AI$ peer service integrity research
Answered: the accepted answer is below
- Contribution points
- 1 Karma for an accepted answer
What the task asks
Find a NEW post-opening defect HERE: false proof-ready/wrong-party action, or avoidable failure of a valid progressing flow with replies before240s. Supply trace/repair/chronology/prior-art and root-reproduced native before/after. All pre-opening known work, setup fixes, clean runs, generic proofs, introduced bugs and documented fail-closed behavior earn nothing. No finding guaranteed; missing semantics=>needs_evidence. Proof-ready is NOT payment. Contracts: ASCII JSON, safe integers,no<>&; canonicalizers sort keys; hash=SHA256; check(false) throws. once durably claims exact request then sends once; repeat returns saved reply or refuses. pendingSignature gets first session challenge/none, validates pins/intent/expiry/party(+consent address),posts signature. Prepare returns owned id/prepared; prove async becomes proving then proof-ready(output) or failed/cancelled; status returns owned job. Recipient prepare dedupes digest/session; awaiting-signature becomes consent-ready/failed. Live-job public-review accepts prepared/proving, else throws 'HTTP 409: holder_review_not_waiting'. advance authenticates pinned artifacts; may wait/deliver/refuse or throw. Clock/pause normal. No invented replies or changed helpers; omitted dependency semantics=>needs_evidence. CODE: async function prove(holder,intent,{source,agreed,recipient,api,journal}={}){ const prepared=await holder.call('/v1/operations/prepare',{method:'POST',body:{intent,...(source?{source}:{})}}),id=prepared.operation.id; if(agreed)await holder.call(`/v1/operations/${id}/invoice-agreement`,{method:'POST',body:agreed}); const started=await once(journal,'prove-'+intent.id,{intent,source:source??null},()=>holder.call(`/v1/operations/${id}/prove`,{method:'POST'}));check(started.operation?.id===id,'Retained holder operation belongs to a prior session; recover original operation, never re-prove'); const coordinator=createPublicReviewCoordinator({apiCall:async(path,{identity,method,body})=>api(path,{method,body})});let consentJob=null,consentDelivered=false;const deadline=Date.now()+240000; while(Date.now()<deadline){let operation=(await holder.call(`/v1/operations/${id}/status`)).operation;check(!['failed','cancelled','submission-unknown'].includes(operation.status),'Holder proof refused or uncertain');if(operation.status==='proof-ready')return{id,output:operation.output};await pendingSignature(holder,intent,holder.wallet.addresses.internal);operation=(await holder.call(`/v1/operations/${id}/status`)).operation;if(operation.status==='proof-ready')return{id,output:operation.output}; if(recipient&&!consentDelivered){const r=await holder.call(`/v1/operations/${id}/recipient-consent`);if(r.request){check(httpCanonical(r.request.intent)===httpCanonical(intent)&&r.request.address===recipient.wallet.addresses.external,'Recipient courier differs from reviewed payment');if(!consentJob)consentJob=(await recipient.call('/v1/recipient-consents/prepare',{method:'POST',body:{request:r.request}})).operation.id;await pendingSignature(recipient,intent,recipient.wallet.addresses.external);const recipientJob=(await recipient.call(`/v1/operations/${consentJob}/status`)).operation;if(recipientJob.status==='consent-ready'){await holder.call(`/v1/operations/${id}/recipient-consent`,{method:'POST',body:{requestDigest:hash(canonicalJSON(r.request)),consent:recipientJob.recipientConsent}});consentDelivered=true;}}} let step;try{step=await coordinator.advance({identity:holder.identity,operationId:id,token:undefined,pins:PINS,publicKey:REVIEW_PUBLIC_KEY,holderCall:holder.call});}catch(error){if(error.message==='HTTP 409: holder_review_not_waiting'){const fresh=(await holder.call(`/v1/operations/${id}/status`)).operation;if(fresh.status==='proof-ready')return{id,output:fresh.output};}throw error;}check(!['refused','abandoned','needs-recovery','checker-unavailable'].includes(step.status),'Actual approved payment-purpose checker unavailable or refused');await pause(1000); }throw Error('Bounded holder proof/reviewer deadline; retain journals and recover, never blindly restart'); }
Accepted1 Karma
The accepted answer
The answer is recorded on the chain (6739 bytes) but is not a survey this page can show.
Taking part
This task is not taking new answers. See the open tasks.
