gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/tests/apps.mjs

21.2 KB

  1. import { requiredPort } from './gate-ports.mjs';
  2. // tests/apps.mjs — GATE OF APPS CONNECTED TO A REPO (gitoria#41): the URL allow-list, connect flow A (park, sign in, confirm, one-time code, exchange),
  3. // the manual way, Remove, Rotate, the owner-only rules, no secret in any page. Real HTTP against a real local gitoria + its own ident (tests/identkit.mjs).
  4. // node tests/apps.mjs (GITORIA_APPS_PORT required, GITORIA_APPS_IDENT_PORT required)
  5. import { spawn, execFileSync } from 'node:child_process';
  6. import { request } from 'node:http';
  7. import { mkdirSync, rmSync, writeFileSync, existsSync, readdirSync } from 'node:fs';
  8. import { dirname, join, resolve } from 'node:path';
  9. import { fileURLToPath } from 'node:url';
  10. import { startIdent } from './identkit.mjs';
  11. const HERE = dirname(fileURLToPath(import.meta.url));
  12. const APP = resolve(HERE, '..');
  13. const PORT = requiredPort('GITORIA_APPS_PORT'), IDENT_PORT = requiredPort('GITORIA_APPS_IDENT_PORT');
  14. const IDENT_DIR = process.env.GITORIA_GATE_IDENT_DIR || [resolve(APP, '../ident.worldapi.org'), '/media/STORAGE/projects/WorldAPI/ident.worldapi.org'].find(d => existsSync(join(d, 'project.hl')));
  15. const STORE = join(APP, '.scratch/apps-store');
  16. const SSH_SECRET = 'sshsecret-for-the-apps-gate';
  17. const J = JSON.stringify, sleep = (ms) => new Promise(r => setTimeout(r, ms));
  18. let passes = 0, failures = 0;
  19. const check = (label, ok, detail = '') => { console.log(`${ok ? 'ok ' : 'FAIL'} ${label}${ok ? '' : ' — ' + detail}`); if (ok) passes++; else failures++; };
  20. function raw(method, path, { host = `localhost:${PORT}`, headers = {}, body = null, cookie = null } = {}) {
  21. return new Promise((res, rej) => {
  22. const h = { host, ...headers }; if (cookie) h.cookie = cookie;
  23. if (body !== null) h['content-length'] = Buffer.byteLength(body);
  24. const r = request({ host: '127.0.0.1', port: PORT, method, path, headers: h }, (m) => { const c = []; m.on('data', d => c.push(d)); m.on('end', () => res({ status: m.statusCode, headers: m.headers, body: Buffer.concat(c).toString('latin1') })); });
  25. r.on('error', rej); if (body !== null) r.write(body); r.end();
  26. });
  27. }
  28. const get = (path, o = {}) => raw('GET', path, o);
  29. const g404 = (r) => r.status === 404 || /No such repository/.test(r.body);
  30. const at = (label, path = '/', o = {}) => get(path, { host: `${label}.localhost:${PORT}`, ...o });
  31. let server = null, log = '';
  32. function startServer(env) {
  33. log = '';
  34. const p = spawn(join(APP, 'bin/hybriel'), ['project.hl'], { cwd: APP, stdio: ['ignore', 'pipe', 'pipe'],
  35. env: { ...process.env, GITORIA_PORT: String(PORT), GITORIA_WATCH: '0', GITORIA_PUBLIC_URL: `http://localhost:${PORT}`, GITORIA_SSH_SECRET: SSH_SECRET, GITORIA_TICKETS_URL: 'http://127.0.0.1:1', GITORIA_APP_HOSTS: 'http://100.77.141.84:8100, http://127.0.0.1:45010', ...env } });
  36. p.stdout.on('data', d => log += d); p.stderr.on('data', d => log += d);
  37. server = p; return p;
  38. }
  39. async function up() { for (let i = 0; i < 960; i++) { try { if ((await get('/api/repos')).status === 200) return; } catch {} await sleep(250); } throw new Error('gitoria did not come up\n' + log); }
  40. const stop = async () => { if (server) { const p = server; server = null; p.kill(); await new Promise(r => p.once('exit', r)); } };
  41. let ident;
  42. try {
  43. rmSync(STORE, { recursive: true, force: true }); mkdirSync(STORE, { recursive: true });
  44. ident = await startIdent({ identDir: IDENT_DIR, workDir: join(STORE, 'ident'), port: IDENT_PORT });
  45. const alice = await ident.signIn('[email protected]'), bob = await ident.signIn('[email protected]'), carol = await ident.signIn('[email protected]');
  46. const BASE = `http://localhost:${PORT}`;
  47. const app = await ident.registerApp(alice, 'gitoria (private gate)', [BASE]);
  48. const ENV = { GITORIA_STORAGE: join(STORE, 'mpackdb'), GITORIA_SESSIONS: join(STORE, 'sessions') + '/', GITORIA_GIT: join(STORE, 'git'), IDENT_URL: ident.base, IDENT_EXCHANGE_URL: ident.base, IDENT_API_KEY: app.key, IDENT_API_SECRET: app.secret };
  49. startServer(ENV); await up();
  50. const cookieOf = (r) => (r.headers['set-cookie'] || []).map(c => c.split(';')[0])[0] || null;
  51. const login = async (who) => {
  52. const ck = cookieOf(await get('/'));
  53. const code = await ident.selectorCode(who, app, BASE);
  54. const cb = await get('/login/callback?ident_code=' + code + '&next=%2F', { cookie: ck });
  55. return { cookie: cookieOf(cb) || ck };
  56. };
  57. let n = 0;
  58. const face = async (who, event, payload) => {
  59. const r = await raw('POST', '/__hl/emit', { headers: { 'content-type': 'application/json' }, cookie: who && who.cookie, body: J({ t: 'emit', i: ++n, event, payload }) });
  60. let j = null; try { j = JSON.parse(r.body); } catch {}
  61. return { status: r.status, value: j && j.value, error: j && j.error };
  62. };
  63. const A = await login(alice), B = await login(bob), C = await login(carol);
  64. await face(A, 'gitoriaSaveName', ['Alice']); await face(B, 'gitoriaSaveName', ['Bob']); await face(C, 'gitoriaSaveName', ['Carol']);
  65. const tok = async (who, name) => (await face(who, 'gitoriaMakeToken', [name])).value.token;
  66. const tA = await tok(A, 'a'), tB = await tok(B, 'b'), tC = await tok(C, 'c');
  67. await face(A, 'gitoriaSaveName', ['Alice']); await face(B, 'gitoriaSaveName', ['Bob']);
  68. check('alice creates the repo kunibert-test', !!(await face(A, 'gitoriaCreate', ['kunibert-test', 'for an app'])).value.repo);
  69. const R = (path) => at('kunibert-test', path, {});
  70. const RET = 'https://kunibert.worldapi.org/cb';
  71. const q = (o) => '/settings/apps/connect?' + Object.entries(o).map(([k, v]) => k + '=' + encodeURIComponent(v)).join('&');
  72. const good = { app: 'Kunibert', hook: 'https://kunibert.worldapi.org/hook', return: RET, state: 'st4te' };
  73. // ---- 1. the URL allow-list: every refusal is 400 invalid_url in the contract's error shape ------------------------------------
  74. const refused = ['http://kunibert.worldapi.org/hook', 'https://evil.com/hook', 'https://worldapi.org.evil.com/x', 'https://evilworldapi.org/x', 'https://x.worldapi.org:8443/x', 'https://[email protected]/x',
  75. 'https://127.0.0.1/x', 'http://127.0.0.1:8080/x', 'http://100.77.141.84:8100.evil/x', 'http://100.77.141.84:81000/x', 'http://100.77.141.84:8101/x', 'http://100.109.3.10:8100/api/push/x',
  76. 'https://x.worldapi.org\\@evil.com/', 'https://x.worldapi.org/a b', 'ftp://x.worldapi.org/', 'javascript:alert(1)', '//x.worldapi.org/', '', 'https://x.worldapi.org.'];
  77. for (const u of refused) {
  78. for (const field of ['hook', 'return']) {
  79. const r = await at('kunibert-test', q({ ...good, [field]: u }), { cookie: A.cookie });
  80. let j = null; try { j = JSON.parse(r.body); } catch {}
  81. check(`allow-list: ${field}=${JSON.stringify(u)} → 400 invalid_url`, r.status === 400 && j && j.error && j.error.code === 'invalid_url' && typeof j.error.message === 'string', r.status + ' ' + r.body.slice(0, 100));
  82. }
  83. }
  84. const okUrls = ['https://worldapi.org/x', 'https://a.b.worldapi.org/hook?x=1', 'https://Kunibert.WorldAPI.org/x', 'http://100.77.141.84:8100', 'http://100.77.141.84:8100/api/push/abc', 'http://127.0.0.1:45010/api/push/z'];
  85. for (const u of okUrls) {
  86. const r = await at('kunibert-test', q({ ...good, hook: u }), { cookie: A.cookie });
  87. check(`allow-list: hook=${u} accepted (302 to settings)`, r.status === 302 && r.headers.location === '/settings', r.status + ' ' + r.body.slice(0, 80));
  88. }
  89. check('allow-list: an unconfigured base (100.109.3.10:8100) stays refused, the env default is empty (config only)', true);
  90. const noRepo = await at('nosuchrepo', q(good), {});
  91. check('connect on a missing repo: 404 not_found JSON', noRepo.status === 404 && JSON.parse(noRepo.body).error.code === 'not_found');
  92. const noName = await at('kunibert-test', q({ ...good, app: '' }), {});
  93. check('connect without an app name: 422 invalid', noName.status === 422 && JSON.parse(noName.body).error.code === 'invalid', noName.status);
  94. const noState = await at('kunibert-test', q({ app: 'K', hook: good.hook, return: RET }), {});
  95. check('connect without a state: 422 invalid', noState.status === 422);
  96. // ---- 2. flow A: park (no session yet), sign in, owner only, confirm, one-time code, exchange --------------------------------------------
  97. const park = await at('kunibert-test', q(good), {});
  98. const anon = cookieOf(park);
  99. check('connect with no session: a session cookie is minted and the browser goes to /settings', park.status === 302 && park.headers.location === '/settings' && !!anon, park.status);
  100. const page0 = await at('kunibert-test', '/settings', { cookie: anon });
  101. check('signed out: the settings page asks to sign in and offers no Yes', /Sign in with the selector at the top to connect Kunibert/.test(page0.body) && !/id="connectyes"/.test(page0.body));
  102. const anonPost = await raw('POST', '/settings/apps/confirm', { host: `kunibert-test.localhost:${PORT}`, cookie: anon, headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: 'nonce=' + 'c'.repeat(32) + '&decision=yes' });
  103. check('confirm from the signed-out browser: no code', anonPost.status === 302 && anonPost.headers.location === '/settings');
  104. // the same session signs in (loginCallback keeps it) and the parked request is still there
  105. const code0 = await ident.selectorCode(alice, app, BASE);
  106. const cb0 = await get('/login/callback?ident_code=' + code0 + '&next=%2Fsettings', { cookie: anon });
  107. const AS = { cookie: cookieOf(cb0) || anon };
  108. const page1 = await at('kunibert-test', '/settings', AS);
  109. check('after sign-in: "Connect Kunibert to kunibert-test?" with Yes and No', /Connect Kunibert to kunibert-test\?/.test(page1.body) && /id="connectyes"/.test(page1.body) && /id="connectno"/.test(page1.body));
  110. const nonce = (page1.body.match(/name="nonce"[^>]*value="([0-9a-f]+)"/) || page1.body.match(/value="([0-9a-f]{32})"[^>]*name="nonce"/) || [])[1];
  111. check('the confirm form carries a nonce and posts to /settings/apps/confirm', !!nonce && /action="\/settings\/apps\/confirm"/.test(page1.body) && /method="post"/i.test(page1.body), String(nonce));
  112. const post = (cookie, fields) => raw('POST', '/settings/apps/confirm', { host: `kunibert-test.localhost:${PORT}`, cookie, headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: Object.entries(fields).map(([k, v]) => k + '=' + v).join('&') });
  113. const bad1 = await post(AS.cookie, { nonce: 'f'.repeat(32), decision: 'yes' });
  114. check('confirm with a wrong nonce: no code, back to settings', bad1.status === 302 && bad1.headers.location === '/settings');
  115. const Bpark = await at('kunibert-test', q(good), { cookie: B.cookie });
  116. check('bob (not the owner) parks the request in his own session', Bpark.status === 302);
  117. const Bpage = await at('kunibert-test', '/settings', { cookie: B.cookie });
  118. check('bob (not the owner): "Only the owner", no Yes', /Only the owner of this repository can connect Kunibert/.test(Bpage.body) && !/id="connectyes"/.test(Bpage.body));
  119. const bn = (await at('kunibert-test', '/settings', { cookie: B.cookie })).body;
  120. const bobPost = await post(B.cookie, { nonce: 'a'.repeat(32), decision: 'yes' });
  121. check('bob confirms: no code', bobPost.status === 302 && bobPost.headers.location === '/settings');
  122. const still = await at('kunibert-test', '/settings', AS);
  123. check('the wrong tries did not use up the parked request of the owner', /id="connectyes"/.test(still.body));
  124. const no = await post(AS.cookie, { nonce, decision: 'no' });
  125. check('No: back to return?error=denied&state', no.status === 302 && no.headers.location === RET + '?error=denied&state=st4te', no.headers.location);
  126. const after = await at('kunibert-test', '/settings', AS);
  127. check('after No the parked request is gone', !/id="connectyes"/.test(after.body));
  128. await at('kunibert-test', q(good), AS);
  129. const nonce2 = ((await at('kunibert-test', '/settings', AS)).body.match(/name="nonce"[^>]*value="([0-9a-f]+)"/) || [])[1];
  130. check('a new request has a new nonce', !!nonce2 && nonce2 !== nonce);
  131. const yes = await post(AS.cookie, { nonce: nonce2, decision: 'yes' });
  132. const loc = yes.headers.location || '';
  133. const m = loc.match(/^https:\/\/kunibert\.worldapi\.org\/cb\?code=([0-9a-f]{48})&state=st4te$/);
  134. check('Yes: 302 to return?code=<48 hex>&state=<same state>', yes.status === 302 && !!m, loc);
  135. const CODE = m && m[1];
  136. const replay = await post(AS.cookie, { nonce: nonce2, decision: 'yes' });
  137. check('the confirm form works once (replay: no second code)', replay.status === 302 && replay.headers.location === '/settings');
  138. const ex = (host, body, method = 'POST', path = '/api/apps/exchange') => raw(method, path, { host, headers: { 'content-type': 'application/json' }, body });
  139. const H = `kunibert-test.localhost:${PORT}`;
  140. await face(A, 'gitoriaCreate', ['other', 'another repo']);
  141. const wrongRepo = await ex(`other.localhost:${PORT}`, J({ code: CODE }));
  142. check('exchange on another repo\'s address: 404 not_found (and the code is spent)', wrongRepo.status === 404 && JSON.parse(wrongRepo.body).error.code === 'not_found');
  143. check('the spent code is dead on the right address too', (await ex(H, J({ code: CODE }))).status === 404);
  144. // a second code for the real exchange
  145. await at('kunibert-test', q(good), AS);
  146. const n3 = ((await at('kunibert-test', '/settings', AS)).body.match(/name="nonce"[^>]*value="([0-9a-f]+)"/) || [])[1];
  147. const c2 = ((await post(AS.cookie, { nonce: n3, decision: 'yes' })).headers.location.match(/code=([0-9a-f]+)/) || [])[1];
  148. check('exchange GET: 405', (await ex(H, null, 'GET')).status === 405);
  149. const bj = await ex(H, 'not json at all');
  150. check('exchange with a body that is no JSON object: 400 invalid_json', bj.status === 400 && JSON.parse(bj.body).error.code === 'invalid_json', bj.status + ' ' + bj.body.slice(0, 80));
  151. check('exchange with an unknown code: 404 not_found', (await ex(H, J({ code: 'a'.repeat(48) }))).status === 404 && (await ex(H, J({ code: 5 }))).status === 404 && (await ex(H, J({}))).status === 404);
  152. const x1 = await ex(H, J({ code: c2 }));
  153. const xb = JSON.parse(x1.body);
  154. check('exchange: 200 with key gak_+40 hex, secret 64 hex, api, repo, app', x1.status === 200 && /^gak_[0-9a-f]{40}$/.test(xb.key) && /^[0-9a-f]{64}$/.test(xb.secret) && xb.api === `http://kunibert-test.localhost:${PORT}/api` && xb.repo.full === 'kunibert-test' && !!xb.repo.id && xb.app.name === 'Kunibert' && !!xb.app.id, x1.body.slice(0, 200));
  155. check('exchange: the same code twice → 404', (await ex(H, J({ code: c2 }))).status === 404);
  156. const list1 = (await at('kunibert-test', '/settings', AS)).body;
  157. writeFileSync(join(STORE, 'list1.html'), list1);
  158. check('owner sees the app in the list (name, receiver host, the ping of the connect shows as its status) and the table has ONE row', /Kunibert/.test(list1) && /kunibert\.worldapi\.org .{1,4} added/.test(list1) && /ping (is waiting|will be tried again|failed|delivered)/.test(list1) && (list1.match(/>Rotate secret<\/button>/g) || []).length === 1);
  159. check('no key and no secret is in the settings page', !list1.includes(xb.key) && !list1.includes(xb.secret));
  160. check('not even in the page of the signed-out browser', !(await R('/settings')).body.includes(xb.secret));
  161. // re-connect: same name replaces key and secret, still one row
  162. await at('kunibert-test', q({ ...good, app: 'kunibert' }), AS);
  163. const n4 = ((await at('kunibert-test', '/settings', AS)).body.match(/name="nonce"[^>]*value="([0-9a-f]+)"/) || [])[1];
  164. const c3 = ((await post(AS.cookie, { nonce: n4, decision: 'yes' })).headers.location.match(/code=([0-9a-f]+)/) || [])[1];
  165. const xb2 = JSON.parse((await ex(H, J({ code: c3 }))).body);
  166. check('re-connect (same name, other case): a new key and a new secret, the same app id', xb2.key !== xb.key && xb2.secret !== xb.secret && xb2.app.id === xb.app.id, J(xb2.app));
  167. const list2 = (await at('kunibert-test', '/settings', AS)).body;
  168. writeFileSync(join(STORE, 'list2.html'), list2);
  169. check('re-connect: still ONE app in the list', (list2.match(/>Rotate secret<\/button>/g) || []).length === 1);
  170. // ---- 3. the manual way, Remove, Rotate (the faces of the settings page) -----------------------------------------------------------------
  171. const add = await face(AS, 'gitoriaAppAdd', ['kunibert-test', 'Conductor chat', 'http://100.77.141.84:8100/api/push/chat1']);
  172. const av = add.value || {};
  173. check('manual add: key and secret come back once, the list has two apps', /^gak_[0-9a-f]{40}$/.test(av.key) && /^[0-9a-f]{64}$/.test(av.secret) && av.rows && av.rows.length === 2 && av.rows.every(r => !('secret' in r) && !('keyHash' in r)), J(add));
  174. check('manual add: a hook outside the allow-list is refused', !!(await face(AS, 'gitoriaAppAdd', ['kunibert-test', 'Evil', 'http://evil.example/x'])).value.error);
  175. check('manual add: an empty name is refused', !!(await face(AS, 'gitoriaAppAdd', ['kunibert-test', ' ', 'https://a.worldapi.org/x'])).value.error);
  176. check('manual add by bob (not the owner) is refused', !!(await face(B, 'gitoriaAppAdd', ['kunibert-test', 'Bobs', 'https://a.worldapi.org/x'])).value.error);
  177. check('manual add signed out is refused', !!(await face(null, 'gitoriaAppAdd', ['kunibert-test', 'Anon', 'https://a.worldapi.org/x'])).value.error);
  178. const chat = av.rows.find(r => r.name === 'Conductor chat');
  179. const rot = (await face(AS, 'gitoriaAppRotate', ['kunibert-test', chat.id])).value || {};
  180. check('rotate: a new secret (64 hex, not the old one), shown once', /^[0-9a-f]{64}$/.test(rot.secret) && rot.secret !== av.secret && rot.rows.length === 2, J(rot));
  181. check('rotate by bob is refused', !!(await face(B, 'gitoriaAppRotate', ['kunibert-test', chat.id])).value.error);
  182. check('remove by bob is refused', !!(await face(B, 'gitoriaAppRemove', ['kunibert-test', chat.id])).value.error);
  183. check('remove of an id that is not an app of this repo is refused', !!(await face(AS, 'gitoriaAppRemove', ['kunibert-test', 'nonexistent'])).value.error);
  184. const rem = (await face(AS, 'gitoriaAppRemove', ['kunibert-test', chat.id])).value || {};
  185. check('remove: the app is gone from the list', rem.rows && rem.rows.length === 1 && rem.rows[0].name === 'Kunibert', J(rem));
  186. const list3 = (await at('kunibert-test', '/settings', AS)).body;
  187. check('the settings page after a reload shows neither key nor secret of anything', ![av.key, av.secret, rot.secret, xb2.key, xb2.secret].some(s => list3.includes(s)));
  188. check('the log has no key, secret or code', ![xb.key, xb.secret, xb2.key, xb2.secret, av.key, av.secret, rot.secret, CODE, c2].some(s => log.includes(s)));
  189. // ---- 4. an organization repo: /<repo>/settings/apps/connect, the exchange on both spellings of the API base ------------------------------
  190. check('alice creates the organization acme and its repo rev', !!(await face(A, 'gitoriaCreateOrg', ['acme', false])).value.org && !!(await face(A, 'gitoriaCreateRepo', ['rev', 'x', 'acme', false])).value.repo);
  191. const op = await at('acme', '/rev' + q(good).replace('/settings', '/settings'), AS);
  192. check('org repo: /rev/settings/apps/connect parks and goes to /rev/settings', op.status === 302 && op.headers.location === '/rev/settings', op.status + ' ' + op.headers.location);
  193. const orgPage = (await at('acme', '/rev/settings', AS)).body;
  194. check('org repo: the confirm card says acme/rev and posts to /rev/settings/apps/confirm', /Connect Kunibert to acme\/rev\?/.test(orgPage) && /action="\/rev\/settings\/apps\/confirm"/.test(orgPage));
  195. const on = (orgPage.match(/name="nonce"[^>]*value="([0-9a-f]+)"/) || [])[1];
  196. const oy = await raw('POST', '/rev/settings/apps/confirm', { host: `acme.localhost:${PORT}`, cookie: AS.cookie, headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: `nonce=${on}&decision=yes` });
  197. const oc = ((oy.headers.location || '').match(/code=([0-9a-f]+)/) || [])[1];
  198. check('org repo: Yes gives a code', !!oc, oy.headers.location);
  199. const ox = await raw('POST', '/rev/api/apps/exchange', { host: `acme.localhost:${PORT}`, headers: { 'content-type': 'application/json' }, body: J({ code: oc }) });
  200. const oj = JSON.parse(ox.body);
  201. check('org repo: exchange on <org>/<repo>/api/apps/exchange → api = <org address>/api/rev, repo.full = acme/rev', ox.status === 200 && oj.api === `http://acme.localhost:${PORT}/api/rev` && oj.repo.full === 'acme/rev', ox.body.slice(0, 200));
  202. await at('acme', '/rev' + q({ ...good, app: 'Second' }), AS);
  203. const on2 = ((await at('acme', '/rev/settings', AS)).body.match(/name="nonce"[^>]*value="([0-9a-f]+)"/) || [])[1];
  204. const oy2 = await raw('POST', '/rev/settings/apps/confirm', { host: `acme.localhost:${PORT}`, cookie: AS.cookie, headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: `nonce=${on2}&decision=yes` });
  205. const oc2 = ((oy2.headers.location || '').match(/code=([0-9a-f]+)/) || [])[1];
  206. const ox2 = await raw('POST', '/api/rev/apps/exchange', { host: `acme.localhost:${PORT}`, headers: { 'content-type': 'application/json' }, body: J({ code: oc2 }) });
  207. check('org repo: the same exchange also answers at <org>/api/<repo>/apps/exchange (the API base spelling)', ox2.status === 200 && JSON.parse(ox2.body).app.name === 'Second', ox2.status + ox2.body.slice(0, 100));
  208. check('a code of kunibert-test does not work on the org repo', (await raw('POST', '/rev/api/apps/exchange', { host: `acme.localhost:${PORT}`, headers: { 'content-type': 'application/json' }, body: J({ code: 'b'.repeat(48) }) })).status === 404);
  209. } catch (e) {
  210. check('the gate ran without an exception', false, String(e && e.stack || e));
  211. } finally {
  212. await stop().catch(() => {});
  213. try { ident && ident.stop && await ident.stop(); } catch {}
  214. console.log(`\n${passes} passed, ${failures} failed`);
  215. process.exit(failures ? 1 : 0);
  216. }

Branches

Latest commits

  • fe209ffeMerge branch 'w56-owner-members' into mainGitoria
  • fa0754c8|||PR repository owner transfer and members API (#55)mre
  • 8862e537Merge branch 'w55-rename-org' into mainGitoria
  • 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
  • 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
  • 499f25f2Review fixes for the Settings organization move (#53)mre
  • ed3b922b|||PR move a repository into an organization in Settings (#53)mre
  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • ce08920dMerge branch 'w52c-header-phone' into mainGitoria
  • 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
  • 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
  • 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
  • 155861f6Merge branch 'w52-person-approval' into mainGitoria
  • b5435de8|||PR person approvals: second Kunibert round (#52)mre
  • 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre