@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 98cb670
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 14:30 UTC

fix: isolate readback badge from acknowledgement atomicity block

davoodmehraban89 committed Nov 24, 2026 at 11:29 UTC 98cb670f6d9f03900ce644efdf43df36127e30f8
4 files changed +6 -2
PROJECT_STATE.md
+2
@@ -711,3 +711,5 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
711
712 ### 2026-11-24 — FIN-B02-R1 — exact CI regression decision
713 - PR253 b3e8cbf Quality 45351849109 failed at Complete acknowledgement atomicity: extracted VM block included new readback badge state but lacks reconciled/readBack variables. 79/79 targeted tests already PASS; Security 45351849209 PASS, WP1/WP2 in progress at observation. Main still dab1a45; PR250 head unchanged 1366724. Keep all atomicity assertions; put badge bookkeeping outside the extracted acknowledgement block, add direct badge assertion to full runtime test. No SQL change. Check exact new SHA, do not claim browser gates from this prior run.
714 +
715 +- B02-R1 candidate: moved badge bookkeeping after the extracted ACK validation boundary; all ACK atomicity assertions untouched. Added full runtime badge assertion for state-equivalent readback. Exact CI not yet observed.
docs/EXECUTION_STATUS.md
+2
@@ -201,3 +201,5 @@
201
202 ### 2026-11-24 — FIN-B02 (candidate)
203 - PR251 browser 258 passed/2 failed; fix synthetic operational settings hydration and bounded transient CAS recovery on stacked B02, no schema changes. Exact-head tests pending. No blind retry on divergent or delete outcome; deliberate resolution still open.
204 +
205 +- B02-R1: prior 79/79 targeted tests PASS, Quality blocked by extraction harness ReferenceError; moved display flag bookkeeping after atomic ACK block. Exact new SHA tests pending.
js/sync.js
+1 -1
@@ -225,8 +225,8 @@ async function runSync(){
225 deletes.forEach(r=>{
226 const key=r.collection+'|'+r.id;syncSnap.delete(key);syncVersionSnap.delete(key);
227 });
228 - reconciled=reconciled||readBack===true;
228 syncFailCount=0;
229 + reconciled=reconciled||readBack===true;
230 guardLoops++;
231 }while(guardLoops<5);
232 const d=computeDiff();
scripts/pending-sync-preservation.test.mjs
+1 -1
@@ -170,7 +170,7 @@ test('unknown precommit upsert failure reads original revision and retries exact
170 test('lost ACK with exact committed postimage reconciles without sending the write again',async()=>{
171 const h=await harness();h.evaluate("datastore.contacts[0].name='new';syncPending=true");
172 h.c.sb.rpc=async(name,args)=>{h.requests.push({name,args});h.setRead(async()=>({data:[row('new',8)],error:null}));return networkFailure();};
173 - await h.c.runSync();assert.equal(h.requests.length,1);assert.equal(h.state().pending,false);assert.equal(h.state().versions[0][1],8);assert.equal(h.state().row.name,'new');
173 + await h.c.runSync();assert.equal(h.requests.length,1);assert.equal(h.state().pending,false);assert.equal(h.state().versions[0][1],8);assert.equal(h.state().row.name,'new');assert.match(h.badge.textContent,/تطابق داده/);
174 });
175 for(const mode of ['divergent','partial','read-error','wrong-tenant','delete','second-network'])test('unknown ACK recovery fails closed for '+mode,async()=>{
176 const h=await harness();h.evaluate("datastore.contacts[0].name='new';syncPending=true");