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 a593c8c
Browse filesBrowse the repository at this point in the historyBrowse files
issue_create: Object.freeze({found: 'key',where: 'the newest issue created since the dispatch whose title is the title sent'}),
528
+
issue_create: Object.freeze({found: 'key',where: 'the newest issue created since the dispatch whose title is the title sent, the list re-read on ISSUE_CREATE_RELIST_DELAYS_MS before unfound'}),
492
529
pr_create: Object.freeze({found: 'key',where: 'the newest pull request on the head sent, created since the dispatch'}),
493
530
comment: Object.freeze({found: 'content',where: 'the newest comment on the issue, created since the dispatch, whose stored body holds the bytes sent'}),
log(`fleet-write: read-back action ${target.action}${target.op}${where}: no issue created since the dispatch carries the title sent yet — re-list ${i+1}/${relists.length} in ${relists[i]} ms (the issue list lags a create; ⛔ the create is not re-sent).`);
738
+
awaitsleep(relists[i]);
739
+
waited+=relists[i];
740
+
listed=awaitlistAll(api,path,t,3);
741
+
hit=find(listed.rows);
742
+
if(hit)log(`fleet-write: read-back action ${target.action}${target.op}: ${repo}#${hit.number} found on re-list ${i+1}, ${waited} ms after the first list.`);
743
+
}
690
744
if(!listed.ok&&!hit){
691
-
rows.push(unread(target,isPr ? `${repo} head ${head}` : `${repo} (new issue)`,listed.failed));
745
+
rows.push(unread(target,where,listed.failed));
692
746
continue;
693
747
}
694
748
if(!hit){
695
-
rows.push({action: target.action,op: target.op,where: isPr ? `${repo} head ${head}` : `${repo} (new issue)`,verdict: 'unverified',cls: 'unfound',why: isPr ? `no pull request on ${head} was created since the dispatch` : `no issue created on ${repo} since the dispatch carries the title sent`});
749
+
consttried=relists.length ? ` (listed ${relists.length+1} times over ${waited} ms)` : '';
750
+
rows.push({action: target.action,op: target.op, where,verdict: 'unverified',cls: 'unfound',why: isPr ? `no pull request on ${head} was created since the dispatch` : `no issue created on ${repo} since the dispatch carries the title sent${tried}`});
"the verdict: post-stamped's own classifier, imported — declared normalisations land, a split, lost or truncated byte is NOT STORED at its first differing byte, an unreadable body is unverified, the PR-create footer forgiven on pr_create alone": 13,
871
926
"the round trip: the card's 41,699 bytes with a multi-byte character across every 16 KiB boundary of every stream, byte for byte through pack, the wire, the runner's env text, the validator and the executor; a per-chunk decode is NOT STORED": 8,
872
927
'the read-back end to end: after a success run each body at its locator — a corrupted read-back exits 4 through the CLI, an unreadable or unfound one 6, a body-less stroke reads nothing, never a retry': 17,
928
+
'the issue_create re-list: a list that lags the create reads back IDENTICAL on a bounded re-list; a real miss is still unfound (exit 6) after exactly the declared window; an unreadable re-list is unread; the create is never re-sent': 13,
873
929
'the wiring: the POST is paced and on the roster, the reads are not, the token never reaches the log': 5,
874
930
'the CLI: a dry run sends nothing, usage, the exit ladder, the session derived from the container, a route read behind a dead proxy refuses': 11,
875
931
});
876
-
constSELF_TEST_BATTERY_FLOOR=15;
932
+
constSELF_TEST_BATTERY_FLOOR=16;
877
933
constUNATTRIBUTED_BATTERY='(unattributed)';
878
934
879
935
constbatteryCases=newMap();
@@ -1119,7 +1175,8 @@ export async function selfTest() {
1119
1175
*/
1120
1176
/**
1121
1177
* The BOARD the read-back reads: `store` maps a read call (`GET <path>`) to
1122
-
* `{ status, json }`, or to a function of the parsed query. The default
1178
+
* `{ status, json }`, or to a function of the parsed query and the elapsed
1179
+
* ms since the dispatch — so a list that lags a create is time too. The default
1123
1180
* holds the one comment the default stroke writes, created just after the
1124
1181
* dispatch and stored as sent — so a stroke that succeeds reads back clean.
1125
1182
*/
@@ -1146,7 +1203,7 @@ export async function selfTest() {
@@ -1427,6 +1484,61 @@ export async function selfTest() {
1427
1484
t('…and the same stroke read back intact exits 0, its row landed',[cliGood.code,cliGood.json?.read_back?.[0]?.verdict],[EXIT_OK,'landed']);
1428
1485
}
1429
1486
1487
+
// ── the issue_create re-list ────────────────────────────────────────────
1488
+
battery('the issue_create re-list: a list that lags the create reads back IDENTICAL on a bounded re-list; a real miss is still unfound (exit 6) after exactly the declared window; an unreadable re-list is unread; the create is never re-sent');
t('the schedule is frozen and non-empty, every wait a positive integer that never shrinks, the whole window at most 30 s',[Object.isFrozen(ISSUE_CREATE_RELIST_DELAYS_MS),ISSUE_CREATE_RELIST_DELAYS_MS.length>0,ISSUE_CREATE_RELIST_DELAYS_MS.every((ms,i,a)=>Number.isInteger(ms)&&ms>0&&(i===0||ms>=a[i-1])),WINDOW<=30_000],[true,true,true,true]);
t('⭐ the list lags the create — the new issue absent from it until 8 s after the dispatch — and the read-back is IDENTICAL on THAT issue, not unfound: success, exit 0',[lag.state,lag.readBack?.rows?.[0]?.verdict,lag.readBack?.rows?.[0]?.cls,lag.readBack?.rows?.[0]?.where,exitForResult(lag)],['success','landed','identical',`${REPO}#20998`,EXIT_OK]);
1513
+
t('…found on the SECOND re-list: the list read at the declared cumulative waits, in order, and no further',lagReads,SCHEDULE.slice(0,3));
1514
+
t('…one printed line per re-list, and one naming the issue and the re-list that found it',[lag.logs.filter((l)=>l.includes('re-list')&&l.includes('the create is not re-sent')).length,lag.logs.some((l)=>l.includes(`${REPO}#20998 found on re-list 2`))],[2,true]);
1515
+
t('⛔ the create is never re-sent: ONE write across the whole stroke — the dispatch — however many re-lists',writes(lag),[DISPATCH]);
t('the control — a list that never carries the title sent — is still unfound: unverified, exit 6, ⛔ never success, ⛔ never not-stored',[miss.state,miss.readBack?.rows?.[0]?.cls,miss.notStored??false,exitForResult(miss)],['unverified','unfound',false,EXIT_UNCONFIRMED]);
1519
+
t('…after exactly the declared window: one list read per step of the schedule, at its cumulative waits, and no more',missReads,SCHEDULE);
1520
+
t('…its reason names how often and over how long it listed, and the CLI sentence still says do not re-run blind, exit 6',[miss.readBack?.rows?.[0]?.why?.includes(`listed ${SCHEDULE.length} times over ${WINDOW} ms`),unverifiedText(miss).includes('do not re-run blind'),unverifiedText(miss).includes(`Exit ${EXIT_UNCONFIRMED}`)],[true,true,true]);
1521
+
t('⛔ …and still ONE write: a miss re-sends nothing',writes(miss),[DISPATCH]);
t('an issue carrying the same title but created BEFORE the dispatch is never taken while the new one lags — the re-list waits for the new one',[stale.state,stale.readBack?.rows?.[0]?.where],['success',`${REPO}#20998`]);
t('a re-list that cannot be read ends the wait as unread — the call and its status named, ⛔ not unfound, no further re-list',[flaky.state,flaky.readBack?.rows?.[0]?.cls,flaky.readBack?.rows?.[0]?.why?.includes('HTTP 503')??false,flakyReads.length,exitForResult(flaky)],['unverified','unread',true,2,EXIT_UNCONFIRMED]);
t('a list that already carries it is read ONCE — no wait, no re-list line',[prompt.state,promptReads.length,prompt.logs.some((l)=>l.includes('re-list'))],['success',1,false]);
t("the re-list is issue_create's alone: a pull its head does not find is read ONCE and unfound, as before",[noPr.state,noPr.readBack?.rows?.[0]?.cls,pulls],['unverified','unfound',1]);
1540
+
}
1541
+
1430
1542
// ── the wiring ──────────────────────────────────────────────────────────
1431
1543
battery('the wiring: the POST is paced and on the roster, the reads are not, the token never reaches the log');
1432
1544
{
@@ -1507,7 +1619,8 @@ export async function selfTest() {
1507
1619
console.log(
1508
1620
`✓ fleet-write/dispatch self-test: ${cases.length} cases pass across ${declared.length} batteries — the transport selector that never guesses, `+
1509
1621
'the session on the envelope, one paced dispatch per stroke, a run found by its request id and waited to its conclusion, both ceilings answered UNCONFIRMED and never retried, '+
1510
-
'and every body read back after a success run — the card\'s 41,699 bytes byte-exact across every 16 KiB boundary, a corrupted read-back NOT STORED (exit 4), an unfound one UNCONFIRMED (6).',
1622
+
'and every body read back after a success run — the card\'s 41,699 bytes byte-exact across every 16 KiB boundary, a corrupted read-back NOT STORED (exit 4), an unfound one UNCONFIRMED (6) '+
1623
+
'only after a lagging issue list was re-read on its bounded schedule, the create never re-sent.',
0 commit comments