docs(row293): record integrated run2 and short TMPDIR correction
This commit is contained in:
1 parent
cf7b596207
commit
6bfab273b5
6 files changed
+128
No files matched your search
@@ -80,3 +80,9 @@ Limits recorded before launch: controls 120 s; stack-release whole 2400 s; case1
|
||||
Run 1 on 57862d614 stopped at the fourth traced file; seat/CLI whole stages never started. Controls are non-vacuous: unflagged 1 commit / 1 maintenance child; flagged 1 commit / 0. Checkout 78/0, working 27/0, git-socket 24/0, lifecycle 13/11; all 313 observed commits across the four files had zero maintenance children. No skips or timeout. Raw logs, commands, event streams, trace index, controller and final zero-cwd sweep are in run1/. These are incomplete gate results, not acceptance.
|
||||
|
||||
Static diagnosis in gander-0176: my harness nested TMPDIR by stage, making lifecycle's tools.sock path 120 bytes. session.mjs:278 refuses >107; launcher.mjs:472 calls it before spawning. A direct /mnt/storage/scratch/tmp/gXXXXXX TMPDIR gives 95. lifecycle.test requires a TMPDIR of about 50 bytes or less. Filbert concurred from source. No product/test/assertion change, no retry, and no harness correction pending placement/CLEAR. Slot returned at 02:31:13Z; all scratch cwd processes were gone.
|
||||
|
||||
## Run 2 authorization and integrated candidate
|
||||
|
||||
sage-3138 classified run 1 as a harness fault, not a candidate/lifecycle red. Rebased under new branch gander/v574-r2 onto b23783f39, retaining the original branch. The four test files and session.mjs have zero upstream drift, and the four-commit range-diff is unchanged. Manifest cdda41f5 remains unchanged and all entries verify.
|
||||
|
||||
Run 2 starts over at P1 with nothing carried: controls, four traced files, all eight seat and 56 CLI files. Corrected harness allocates each stage's TMPDIR with mktemp -d /mnt/storage/scratch/tmp/gXXXXXX, directly in scratch; logs/traces remain separate. lifecycle's expected tools.sock path is 95 bytes, replacing run 1's 120, below the 107-byte product limit. This is a harness-only correction and no test or assertion changed. The previous pre-recorded limits remain. Start load under 4; any second red stops to Sage/Mos before any change. Integration and harness records are in integration-r2/.
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"scratch": "/mnt/storage/scratch/tmp/gtrB9gF",
|
||||
"stage_TMPDIR": "mktemp -d /mnt/storage/scratch/tmp/gXXXXXX",
|
||||
"expected_lifecycle_tools_socket_bytes": 95,
|
||||
"previous_bytes": 120,
|
||||
"reason": "sage-3138",
|
||||
"manifest_unchanged": true,
|
||||
"base": "b23783f3951e5b750ef49cd0c2d7353640ea6899"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import {spawnSync} from 'node:child_process';
|
||||
import {writeFileSync} from 'node:fs';
|
||||
import {gitEnv} from '/home/jwoltje/.t3/worktrees/mosaic-stack/gander-row196/packages/seat/src/checkout.mjs';
|
||||
const [root, mode] = process.argv.slice(2);
|
||||
const env = gitEnv();
|
||||
if ('GIT_TRACE2' in env || 'GIT_TRACE2_EVENT' in env) throw Error('gitEnv unexpectedly retained tracing');
|
||||
const flags = mode === 'flagged' ? ['-c','maintenance.auto=false','-c','gc.auto=0'] : [];
|
||||
function git(args) {
|
||||
const r = spawnSync('git',[...flags,...args],{cwd:root,env,encoding:'utf8'});
|
||||
if (r.status !== 0) throw Error(JSON.stringify({args,status:r.status,out:r.stdout,err:r.stderr}));
|
||||
}
|
||||
git(['init','-q']);
|
||||
writeFileSync(root+'/fixture.txt','fixture commit\n');
|
||||
git(['add','fixture.txt']);
|
||||
git(['-c','user.name=Fixture','-c','[email protected]','commit','-qm','fixture']);
|
||||
console.log(JSON.stringify({mode,commit:true,usesActualGitEnv:true,outerTraceScrubbed:true}));
|
||||
Whitespace-only changes.
@@ -0,0 +1,93 @@
|
||||
import os, sys, json, time, pathlib, subprocess, shlex, re, math
|
||||
ROOT=pathlib.Path('/home/jwoltje/.t3/worktrees/mosaic-stack/gander-row196')
|
||||
RUN=pathlib.Path(__file__).parent
|
||||
OUT=RUN/'records'; OUT.mkdir(exist_ok=True)
|
||||
FOUR=['packages/seat/tests/checkout.test.mjs','packages/seat/tests/working.test.mjs','packages/cli/tests/git-socket.test.mjs','packages/cli/tests/lifecycle.test.mjs']
|
||||
PACKAGES={p:sorted(str(f.relative_to(ROOT)) for f in (ROOT/'packages'/p/'tests').glob('*.test.mjs')) for p in ['seat','cli']}
|
||||
results={'head':subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),'manifest':'cdda41f5baa6b04e6e5bb9b82beff8e00ceef440c6702565cc86944f249bb5d3','files':PACKAGES,'stages':[],'status':'PREPARED'}
|
||||
def save(): (OUT/'results.json').write_text(json.dumps(results,indent=2)+'\n')
|
||||
def fail(message):
|
||||
results['status']='STOP'; results['stop']=message; save(); print('STOP '+message,flush=True); sys.exit(1)
|
||||
def busy(label):
|
||||
r=subprocess.run(['bash','/mnt/storage/scratch/sage-busy-now.sh'],text=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
|
||||
(OUT/(label+'.busy.log')).write_text(r.stdout)
|
||||
if r.returncode or r.stdout.strip().splitlines()[-1:]!=['CLEAR']: fail('busy refusal before '+label+': '+r.stdout)
|
||||
def writers(tmp):
|
||||
found=[]
|
||||
for p in pathlib.Path('/proc').glob('[0-9]*'):
|
||||
try:
|
||||
comm=(p/'comm').read_text().strip(); cwd=os.readlink(p/'cwd').removesuffix(' (deleted)')
|
||||
if (comm=='git' or comm.startswith('git-')) and (cwd==str(tmp) or cwd.startswith(str(tmp)+'/')): found.append({'pid':int(p.name),'comm':comm,'cwd':cwd})
|
||||
except (OSError,ValueError): pass
|
||||
return found
|
||||
def idle(label,tmp):
|
||||
start=time.monotonic(); history=[]
|
||||
while True:
|
||||
live=writers(tmp); history.append({'seconds':round(time.monotonic()-start,3),'writers':live})
|
||||
if not live: break
|
||||
if time.monotonic()-start>60: fail('git writer remains after '+label)
|
||||
time.sleep(.25)
|
||||
(OUT/(label+'.sweep.json')).write_text(json.dumps(history,indent=2)+'\n')
|
||||
def trace_counts(events):
|
||||
starts=[]; commits=[]; maintenance=[]; files=list(events.glob('*'))
|
||||
for file in files:
|
||||
for line in file.read_text(errors='strict').splitlines():
|
||||
e=json.loads(line); argv=e.get('argv',[])
|
||||
if e.get('event')=='start':
|
||||
starts.append(e)
|
||||
if 'commit' in argv: commits.append(e)
|
||||
if e.get('event')=='child_start' and any(argv[i:i+3]==['maintenance','run','--auto'] for i in range(len(argv)-2)): maintenance.append(e)
|
||||
return {'event_files':len(files),'git_starts':len(starts),'commits':len(commits),'flagged_commits':sum('maintenance.auto=false' in e['argv'] and 'gc.auto=0' in e['argv'] for e in commits),'maintenance_children':len(maintenance),'maintenance_events':maintenance}
|
||||
def run(label,args,limit,traced=False,positive=False):
|
||||
busy(label)
|
||||
folder=RUN/label; folder.mkdir(exist_ok=True); tmp=pathlib.Path(subprocess.check_output(['mktemp','-d','/mnt/storage/scratch/tmp/gXXXXXX'],text=True).strip())
|
||||
if '__CONTROL_REPO__' in args:
|
||||
repo=tmp/'repo'; repo.mkdir(); args=[str(repo) if a=='__CONTROL_REPO__' else a for a in args]
|
||||
env=os.environ.copy(); env['TMPDIR']=str(tmp)
|
||||
events=folder/'events'
|
||||
if traced:
|
||||
events.mkdir(exist_ok=True)
|
||||
shim=RUN/'bin'/'git'
|
||||
shim.write_text('#!/bin/bash\nexport GIT_TRACE2='+shlex.quote(str(folder/'git.trace'))+'\nexport GIT_TRACE2_EVENT='+shlex.quote(str(events))+'\nexec /usr/bin/git "$@"\n'); shim.chmod(0o755)
|
||||
env['PATH']=str(RUN/'bin')+':'+env['PATH']
|
||||
command=['timeout','-k','10',str(limit),*args]
|
||||
header={'label':label,'head':results['head'],'manifest':results['manifest'],'argv':command,'limit':limit,'tmpdir':str(tmp)}
|
||||
(OUT/(label+'.command.json')).write_text(json.dumps(header,indent=2)+'\n')
|
||||
log=OUT/(label+'.log'); print('START '+json.dumps(header),flush=True)
|
||||
shell='set -o pipefail\n'+shlex.join(command)+' 2>&1 | tee '+shlex.quote(str(log))
|
||||
start=time.monotonic(); proc=subprocess.Popen(['bash','-c',shell],cwd=ROOT,env=env,start_new_session=True)
|
||||
try: rc=proc.wait(timeout=limit+30)
|
||||
except subprocess.TimeoutExpired:
|
||||
import signal
|
||||
os.killpg(proc.pid,signal.SIGKILL); proc.wait(); fail('outer timeout '+label)
|
||||
seconds=round(time.monotonic()-start,3); text=log.read_text()
|
||||
record={**header,'rc':rc,'wall_seconds':seconds,'log':str(log),'counts':{k:int(re.findall(r'^# '+k+r' (\d+)\s*$',text,re.M)[-1]) for k in ['tests','pass','fail','cancelled','skipped','todo'] if re.findall(r'^# '+k+r' (\d+)\s*$',text,re.M)},'skip_lines':[line for line in text.splitlines() if '# SKIP' in line]}
|
||||
if traced:
|
||||
idle(label,tmp); record['trace']=trace_counts(events)
|
||||
results['stages'].append(record); save(); print('END '+json.dumps(record),flush=True)
|
||||
if rc: fail('nonzero '+label+' rc='+str(rc))
|
||||
if traced:
|
||||
counts=record['trace']
|
||||
if counts['commits']<1 or counts['event_files']<1: fail('vacuous trace '+label)
|
||||
if positive and counts['maintenance_children']<1: fail('positive control missed maintenance')
|
||||
if not positive and counts['maintenance_children']!=0: fail('maintenance child '+label)
|
||||
if '--test' in args and record['counts'].get('fail',0): fail('test failure '+label)
|
||||
def limit(file):
|
||||
if file.endswith('/stack-release.test.mjs'): return 2400
|
||||
if file.endswith('/case1-accept.test.mjs'): return 1200
|
||||
return 900
|
||||
save()
|
||||
if len(sys.argv)<2 or sys.argv[1]!='run':
|
||||
print(json.dumps({'prepared':True,'packages':{k:len(v) for k,v in PACKAGES.items()}})); sys.exit(0)
|
||||
if float(pathlib.Path('/proc/loadavg').read_text().split()[0])>=4: fail('load not below 4 at start')
|
||||
results['status']='RUNNING'; results['started_utc']=time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()); save()
|
||||
print(json.dumps({'head':results['head'],'manifest':results['manifest'],'whole_file_list':PACKAGES},indent=2),flush=True)
|
||||
for mode in ['positive','flagged']:
|
||||
run('control-'+mode,['node',str(RUN/'control.mjs'),'__CONTROL_REPO__',mode],120,traced=True,positive=mode=='positive')
|
||||
for file in FOUR:
|
||||
run('proof-'+pathlib.Path(file).stem,['node','--test','--test-concurrency=1','--test-reporter=tap',file],limit(file),traced=True)
|
||||
for package,files in PACKAGES.items():
|
||||
for file in files:
|
||||
run(package+'-'+pathlib.Path(file).stem,['node','--test','--test-concurrency=1','--test-reporter=tap',file],limit(file))
|
||||
results['status']='GREEN'; results['finished_utc']=time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()); save()
|
||||
print('GREEN all stages',flush=True)
|
||||
@@ -0,0 +1,4 @@
|
||||
1: 65e919e5c = 1: a61fa3043 test(git): disable detached fixture maintenance per mos-1369
|
||||
2: 7da382244 = 2: 82700c431 docs(v574): audit fixture comparisons and plan trace proof
|
||||
3: 57862d614 = 3: 082915d32 docs(v574): record static approval and trace evidence requirements
|
||||
4: cda1b01b9 = 4: cf7b59620 docs: preserve row293 first trace run and TMPDIR stop
|
||||
Reference in new issue
Block a user