import pathlib, subprocess, json
root=pathlib.Path('/tmp/factory-pr-44727-evidence-2/fixtures')
for kind,sep in [('control','-'),('u2028','\u2028'),('u2029','\u2029')]:
 for layout in (['lf'] if kind=='control' else ['lf','crlf','sameline']):
  for twin in ['a','b']:
   name=f'{kind}-{layout}-{twin}'
   repo=root/'repos'/name
   repo.mkdir(parents=True,exist_ok=True)
   subprocess.run(['git','init','-q',str(repo)],check=True)
   url=f'ssh://git@forge.example/org/{layout}-first{sep}last.git'
   nl='\r\n' if layout=='crlf' else '\n'
   config=('[remote "origin"]'+(' url = ' if layout=='sameline' else nl+' url = ')+url+nl)
   (repo/'.git/config').write_bytes(config.encode())
   assert subprocess.check_output(['git','-C',str(repo),'config','--get','remote.origin.url']).decode().rstrip('\n')==url
   transcript=root/'claude/projects'/name/f'{name}.jsonl'
   transcript.parent.mkdir(parents=True,exist_ok=True)
   transcript.write_text('\n'.join(json.dumps(x) for x in [dict(type='user',cwd=str(repo),sessionId=name,timestamp='2026-11-28T00:00:00Z',message={'role':'user','content':f'Example {name}'}),dict(type='assistant',message={'role':'assistant','content':[{'type':'text','text':'Example transcript'}]})])+'\n')
