@giamme/forge 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +1 -1
  3. package/SKILL.md +31 -12
  4. package/VERSION +1 -1
  5. package/docs/add-ons.md +11 -6
  6. package/docs/artifacts.md +18 -6
  7. package/docs/commands.md +189 -17
  8. package/docs/decomposed-runs.md +13 -5
  9. package/docs/forge-ui.md +34 -4
  10. package/docs/memory.md +2 -1
  11. package/docs/models.md +4 -2
  12. package/docs/reviews.md +81 -19
  13. package/docs/troubleshooting.md +3 -1
  14. package/forge +17 -1
  15. package/package.json +1 -1
  16. package/references/dataset.md +40 -14
  17. package/references/decision-models.md +759 -0
  18. package/references/decompose.md +197 -28
  19. package/references/harnesses.md +10 -3
  20. package/references/planning.md +8 -0
  21. package/references/solo.md +13 -3
  22. package/references/ui.md +11 -0
  23. package/scripts/forge-artifact.sh +30 -4
  24. package/scripts/forge-config.py +238 -29
  25. package/scripts/forge-contract.py +127 -58
  26. package/scripts/forge-control.py +40 -9
  27. package/scripts/forge-decide.py +6 -0
  28. package/scripts/forge-dispatch.sh +47 -15
  29. package/scripts/forge-fail-first.py +2 -2
  30. package/scripts/forge-gate-addressed.sh +40 -0
  31. package/scripts/forge-gate-message.sh +64 -0
  32. package/scripts/forge-issues.py +368 -36
  33. package/scripts/forge-jev-options.sh +269 -42
  34. package/scripts/forge-lib-attribute.sh +447 -0
  35. package/scripts/forge-lib-gates.sh +32 -0
  36. package/scripts/forge-lib-plans.sh +17 -6
  37. package/scripts/forge-lib-review.sh +24 -19
  38. package/scripts/forge-lib-task.sh +219 -39
  39. package/scripts/forge-lib-verify.sh +45 -8
  40. package/scripts/forge-memory.sh +3 -3
  41. package/scripts/forge-parallel-options.sh +44 -5
  42. package/scripts/forge-parallel.sh +503 -304
  43. package/scripts/forge-plan-check.py +35 -1
  44. package/scripts/forge-pre-review.py +437 -0
  45. package/scripts/forge-prompt.py +25 -5
  46. package/scripts/forge-route.py +2 -2
  47. package/scripts/forge-runtime.py +55 -1
  48. package/scripts/forge-schedule.py +70 -9
  49. package/scripts/forge-shadow.py +2 -2
  50. package/scripts/forge-solo.sh +41 -10
  51. package/scripts/forge-submodules.py +389 -0
  52. package/scripts/forge-sweep.py +542 -0
  53. package/scripts/forge_dataset/cli.py +12 -6
  54. package/scripts/forge_dataset/export.py +55 -45
  55. package/scripts/forge_dataset/forecast.py +4 -1
  56. package/scripts/forge_dataset/harvest.py +33 -5
  57. package/scripts/{forge_jev/outcome.py → forge_dataset/states.py} +21 -7
  58. package/scripts/forge_decide/__init__.py +141 -0
  59. package/scripts/forge_decide/budget.py +149 -0
  60. package/scripts/forge_decide/cache.py +66 -0
  61. package/scripts/forge_decide/cli.py +953 -0
  62. package/scripts/forge_decide/doctor.py +221 -0
  63. package/scripts/forge_decide/label_addressed.py +75 -0
  64. package/scripts/forge_decide/label_attribution.py +62 -0
  65. package/scripts/forge_decide/label_coverage.py +81 -0
  66. package/scripts/forge_decide/label_message.py +38 -0
  67. package/scripts/forge_decide/label_prompt.py +139 -0
  68. package/scripts/forge_decide/labels.py +328 -0
  69. package/scripts/forge_decide/metrics.py +125 -0
  70. package/scripts/forge_decide/migrate.py +226 -0
  71. package/scripts/forge_decide/providers.py +292 -0
  72. package/scripts/forge_decide/replay.py +350 -0
  73. package/scripts/forge_decide/report.py +382 -0
  74. package/scripts/forge_decide/resolve.py +397 -0
  75. package/scripts/forge_decide/sites.py +377 -0
  76. package/scripts/forge_jev/__init__.py +202 -104
  77. package/scripts/forge_jev/addressed.py +171 -0
  78. package/scripts/forge_jev/attribution.py +198 -0
  79. package/scripts/forge_jev/cli.py +460 -382
  80. package/scripts/forge_jev/client.py +155 -77
  81. package/scripts/forge_jev/coupling.py +19 -87
  82. package/scripts/forge_jev/coverage.py +303 -0
  83. package/scripts/forge_jev/findings.py +219 -0
  84. package/scripts/forge_jev/gates.py +225 -27
  85. package/scripts/forge_jev/memory.py +65 -4
  86. package/scripts/forge_jev/message.py +134 -0
  87. package/scripts/forge_jev/plan_gates.py +294 -0
  88. package/scripts/forge_jev/questions.py +173 -313
  89. package/scripts/forge_jev/verify.py +130 -104
  90. package/ui/README.md +41 -10
  91. package/ui/docs/api.md +212 -44
  92. package/ui/forge_ui/checks.py +331 -0
  93. package/ui/forge_ui/control.py +60 -11
  94. package/ui/forge_ui/export.py +8 -3
  95. package/ui/forge_ui/models.py +1 -0
  96. package/ui/forge_ui/reader.py +436 -26
  97. package/ui/forge_ui/server.py +13 -0
  98. package/ui/forge_ui/static/app.js +15 -8
  99. package/ui/forge_ui/static/checksview.js +449 -0
  100. package/ui/forge_ui/static/controls.js +20 -13
  101. package/ui/forge_ui/static/convo.js +11 -2
  102. package/ui/forge_ui/static/findingsview.js +6 -4
  103. package/ui/forge_ui/static/index.html +1 -0
  104. package/ui/forge_ui/static/panel.js +105 -17
  105. package/ui/forge_ui/static/runmodel.js +40 -2
  106. package/ui/forge_ui/static/scene3d.js +2 -15
  107. package/ui/forge_ui/static/settings.js +336 -41
  108. package/ui/forge_ui/static/style.css +72 -7
  109. package/ui/forge_ui/transcripts.py +225 -54
  110. package/references/jev.md +0 -865
  111. package/scripts/forge_jev/backtest.py +0 -322
  112. package/scripts/forge_jev/corpus.py +0 -156
  113. package/scripts/forge_jev/features.py +0 -24
  114. package/scripts/forge_jev/predict.py +0 -204
  115. package/scripts/forge_jev/review.py +0 -73
  116. package/scripts/forge_jev/routing.py +0 -271
  117. package/scripts/forge_jev/subset.py +0 -123
@@ -13,6 +13,7 @@
13
13
  'use strict';
14
14
 
15
15
  const LEVELS = ['P0', 'P1', 'P2', 'P3'];
16
+ const DEFAULT_LEVEL = 'P2'; // scripts/forge-contract.py DEFAULT_THRESHOLD
16
17
  const EFFORTS = ['default', 'low', 'medium', 'high', 'xhigh', 'max'];
17
18
  const MAX_FIELD = 256; // control.py: a body string is at most this long
18
19
  const LIVE_ONLY = 'only while a run is in progress';
@@ -31,7 +32,7 @@
31
32
  };
32
33
  const BACKOFF_FORMS = 'exp:<base>[,<cap>], linear:<start>,<step>[,<cap>] or list:<a>,<b>,… (seconds)';
33
34
  // A task status after which "Retry now" applies (or the policy stopped it).
34
- const RETRYABLE = ['FAIL', 'UNKNOWN', 'TIMEOUT', 'ERROR', 'INTERRUPTED', 'BLOCKED'];
35
+ const RETRYABLE = ['FAIL', 'UNKNOWN', 'TIMEOUT', 'ERROR', 'INTERRUPTED', 'BLOCKED', 'INVALIDATED']; // scripts/forge-schedule.py RETRYABLE; NEEDS_INPUT is in neither list
35
36
 
36
37
  const obj = v => v && typeof v === 'object' && !Array.isArray(v) ? v : {};
37
38
  const num = v => typeof v === 'number' && Number.isFinite(v) ? v : null;
@@ -83,7 +84,8 @@
83
84
  if (task && info.planOnly) return bad(`${info.label} applies to the whole run, not a task`);
84
85
  const text = String(input === undefined || input === null ? '' : input).trim();
85
86
  if (key === 'qa-threshold') {
86
- return LEVELS.includes(text) || text === 'none' || (task && text === 'inherit') ? { ok: true, value: text } : bad('P0, P1, P2, P3 or none');
87
+ return LEVELS.includes(text) || text === 'none' || (task ? text === 'inherit' : text === 'default') ? { ok: true, value: text }
88
+ : bad(task ? 'P0, P1, P2, P3, none or inherit' : 'P0, P1, P2, P3, none or default');
87
89
  }
88
90
  if (task && key === 'retry-budget' && text === 'inherit') return { ok: true, value: 'inherit' };
89
91
  if (key === 'max-parallel') {
@@ -115,7 +117,8 @@
115
117
  }
116
118
 
117
119
  const shown = (key, value, task) => key === 'timeout' ? `${minutesOf(Number(value))} min`
118
- : key === 'qa-threshold' && value === 'none' && task ? 'none (no threshold for this task)'
120
+ : key === 'qa-threshold' && value === 'none' ? (task ? 'P3 for this task' : 'P3 (nothing tolerated)')
121
+ : key === 'qa-threshold' && value === 'default' ? 'the default (P2)'
119
122
  : key === 'infra-backoff' && value === 'none' ? 'the default (exp:60)' : value;
120
123
  const inTask = task => task ? ` for task \`${task}\`` : '';
121
124
 
@@ -172,7 +175,9 @@
172
175
  function runValues(controls) {
173
176
  const c = obj(controls), run = obj(c.run);
174
177
  return { live: c.live === true, fractal: c.fractal === true,
175
- qa: LEVELS.includes(run.qa_threshold) ? run.qa_threshold : 'none',
178
+ qa: LEVELS.includes(run.qa_threshold) ? run.qa_threshold : run.qa_threshold === 'none' ? 'P3' : DEFAULT_LEVEL,
179
+ qaSource: run.qa_threshold_source === 'set' ? 'set' : 'default',
180
+ qaText: `${LEVELS.includes(run.qa_threshold) ? run.qa_threshold : run.qa_threshold === 'none' ? 'P3' : DEFAULT_LEVEL} (${run.qa_threshold_source === 'set' ? 'set' : 'default'})`,
176
181
  timeout: num(run.timeout), timeoutMin: minutesOf(run.timeout),
177
182
  escalateAfter: num(run.escalate_after), verifyRetries: num(run.verify_retries),
178
183
  retryBudget: num(run.retry_budget), infraBudget: num(run.infra_budget),
@@ -211,16 +216,17 @@
211
216
  }
212
217
  const requestText = st => st.state === 'refused' ? `refused${st.reason ? ': ' + st.reason : ''}` : st.state;
213
218
  // Whether "Retry now" shows for a task: live only, after it ended without passing or once the policy stopped it.
219
+ // Never for a task waiting for an answer: forge refuses a retry without one (retry --answer).
214
220
  const canRetry = (controls, id) => {
215
221
  const c = obj(controls), v = taskValues(c, id);
216
- return c.live === true && v.known && v.status !== 'MERGED' && (RETRYABLE.includes(v.status) || v.stop);
222
+ return c.live === true && v.known && v.status !== 'MERGED' && v.status !== 'NEEDS_INPUT' && (RETRYABLE.includes(v.status) || v.stop);
217
223
  };
218
224
  // A task's controls with the effective value of each: an override wins, else the run's value is inherited.
219
225
  function taskValues(controls, id) {
220
226
  const c = obj(controls), t = obj(obj(c.tasks)[id]), run = runValues(c);
221
227
  const level = t.qa_threshold;
222
228
  const threshold = LEVELS.includes(level) ? { mode: level, effective: level, from: 'task' }
223
- : level === 'none' ? { mode: 'none', effective: 'none', from: 'task' }
229
+ : level === 'none' ? { mode: 'none', effective: 'P3', from: 'task' }
224
230
  : { mode: 'inherit', effective: run.qa, from: 'run' };
225
231
  const own = num(t.retry_budget), eff = own !== null ? own : run.retryBudget;
226
232
  return { id, known: !!c.tasks && id in c.tasks, status: typeof t.status === 'string' ? t.status : 'PENDING',
@@ -505,7 +511,8 @@
505
511
 
506
512
  function levelRow(view, c, o) {
507
513
  const r = shell(view, o.key, o.label, false), perm = o.perm;
508
- const options = (o.inherit ? [{ value: 'inherit', label: 'Inherit', title: "Use the run's threshold" }] : [])
514
+ const options = (o.inherit ? [{ value: 'inherit', label: 'Inherit', title: "Use the run's threshold" }]
515
+ : [{ value: 'default', label: 'Default', title: 'Remove the setting: the default (P2) applies' }])
509
516
  .concat(LEVELS.map(l => ({ value: l, label: l })), [{ value: 'none', label: 'None', title: o.noneTitle }]);
510
517
  r.control.append(bank(r, options, o.current, perm.enabled, (value, button) => {
511
518
  if (value !== o.current) commit(view, r, { kind: 'set', key: 'qa-threshold', input: value, task: o.task }, [], button);
@@ -540,9 +547,9 @@
540
547
  body.append(runKeys(view, c));
541
548
  if (v.pauses.length) body.append(pauseBox(view, c));
542
549
  }
543
- body.append(levelRow(view, c, { key: 'qa-threshold', label: 'QA threshold', current: v.qa, perm: perm('qa-threshold'),
544
- help: v.qa === 'none' ? 'The least severe finding that still blocks: no threshold is set.'
545
- : `The least severe finding that still blocks: ${v.qa} (${LEVELS.slice(0, LEVELS.indexOf(v.qa) + 1).join(', ')} block).`, noneTitle: 'No threshold' }));
550
+ body.append(levelRow(view, c, { key: 'qa-threshold', label: 'QA threshold', current: v.qaSource === 'set' ? v.qa : 'default', perm: perm('qa-threshold'),
551
+ help: `The least severe finding that still blocks: ${v.qaText} (${LEVELS.slice(0, LEVELS.indexOf(v.qa) + 1).join(', ')} block).`,
552
+ noneTitle: 'P3: nothing is tolerated' }));
546
553
  body.append(countRow(view, c, { key: 'timeout', label: 'Timeout', unit: 'minutes', decimal: true, value: v.timeoutMin, placeholder: 'default', perm: perm('timeout'),
547
554
  help: v.timeoutMin === null ? "Not set: each model's own limit applies. 0 turns the limit off." : `Each model call stops after ${v.timeoutMin} min. 0 turns the limit off.` }));
548
555
  body.append(countRow(view, c, { key: 'escalate-after', label: 'Escalate after', unit: 'failures', value: v.escalateAfter, perm: perm('escalate-after'),
@@ -571,9 +578,9 @@
571
578
  if (v.status === 'MERGED') { body.append(u.el('p', 'Merged: there is nothing left to change for this task.', 'muted ctl-note')); return body; }
572
579
  const th = v.threshold, task = id;
573
580
  body.append(levelRow(view, c, { key: 'qa-threshold', label: 'Threshold override', inherit: true, task, current: th.mode, perm: canEdit(c, 'qa-threshold', id),
574
- noneTitle: 'No threshold for this task',
575
- help: th.mode === 'inherit' ? `Inherits ${v.run.qa === 'none' ? 'no threshold' : v.run.qa} from the run.`
576
- : th.mode === 'none' ? 'No threshold for this task, whatever the run sets.' : `${th.mode} for this task, whatever the run sets.` }));
581
+ noneTitle: 'P3 for this task: nothing is tolerated',
582
+ help: th.mode === 'inherit' ? `Inherits ${v.run.qa} from the run.`
583
+ : th.mode === 'none' ? 'P3 for this task, whatever the run sets.' : `${th.mode} for this task, whatever the run sets.` }));
577
584
  const rb = v.retry, used = rb.effective === null ? `used ${rb.used}` : `used ${rb.used} of ${rb.effective}`;
578
585
  body.append(countRow(view, c, { key: 'retry-budget', label: 'Retry budget', unit: 'retries', task, value: rb.own, placeholder: rb.effective === null ? 'inherit' : String(rb.effective),
579
586
  inherit: rb.mode === 'inherit' ? 'pressed' : 'ready', perm: canEdit(c, 'retry-budget', id),
@@ -4,7 +4,7 @@
4
4
  apart, and while the agent runs a poll every few seconds that follows the end. Defines window.ForgeConvo.render(host, ctx).
5
5
  All API values enter the DOM as text.
6
6
  ctx = { run, spec: {task, exec}, brief (the Execution, when the run lists it), live (false in an export), fetchJSON(path),
7
- rerender(), closeHref, diffHash(spec) → hash } */
7
+ rerender(), closeHref, diffHash(spec) → hash, focus (the index of an event to open it at, or null) } */
8
8
  window.ForgeConvo = (() => {
9
9
  'use strict';
10
10
  const list = v => Array.isArray(v) ? v : [];
@@ -248,7 +248,10 @@ window.ForgeConvo = (() => {
248
248
  if (!errs.length) return;
249
249
  v.err = (v.err == null ? -1 : v.err) + 1;
250
250
  if (v.err >= errs.length) v.err = 0;
251
- const n = errs[v.err];
251
+ reveal(f, v, errs[v.err]);
252
+ }
253
+ // an event brought into view: shown whatever the filter, its folds open, focused and flashed
254
+ function reveal(f, v, n) {
252
255
  if (n.hidden) { v.query = ''; v.show = 'all'; f.search.value = ''; filter(f, v); }
253
256
  for (const d of n.querySelectorAll('details')) d.open = true;
254
257
  n.scrollIntoView({ block: 'center' }); n.focus({ preventScroll: true });
@@ -282,6 +285,12 @@ window.ForgeConvo = (() => {
282
285
  f.status.replaceChildren(...status);
283
286
  const grew = events(f, ctx, D, v);
284
287
  filter(f, v);
288
+ // opened at one event (a check, an environment problem): brought into view once, and the end is no longer followed
289
+ const at = Number.isInteger(ctx.focus) ? f.nodes[ctx.focus] : null;
290
+ if (at && f.focused !== ctx.focus) {
291
+ f.focused = ctx.focus; v.follow = false; f.follow.setAttribute('aria-pressed', 'false');
292
+ requestAnimationFrame(() => { if (at.isConnected) reveal(f, v, at); });
293
+ }
285
294
  if (running && v.follow && (grew || fresh)) requestAnimationFrame(() => end(f));
286
295
  // a log still being written: read it again shortly, while this view shows it
287
296
  if (running && !entry.timer) {
@@ -17,14 +17,15 @@
17
17
  const list = v => Array.isArray(v) ? v : [];
18
18
  const SEVERITIES = ['P0', 'P1', 'P2', 'P3'];
19
19
  const ORIGINS = ['tolerated', 'accepted', 'review', 'plausible'];
20
- const STATUSES = ['open', 'filed', 'fixed', 'dismissed'];
20
+ const STATUSES = ['open', 'filed', 'fixed', 'swept', 'dismissed'];
21
21
 
22
22
  /* ---------- pure ---------- */
23
- // open | filed (its issue is OPEN, or its state is not known yet) | fixed (CLOSED) | dismissed. A dismissal wins, so
24
- // that an Undismiss reaches every dismissed row.
23
+ // open | filed (its issue is OPEN, or its state is not known yet) | fixed (CLOSED) | swept (the run's finding sweep
24
+ // fixed it: nothing to file) | dismissed. A dismissal wins, so that an Undismiss reaches every dismissed row.
25
25
  function statusOf(f) {
26
26
  if (f && f.dismissed) return 'dismissed';
27
27
  if (f && f.filed) return String(f.filed.state || '').toUpperCase() === 'CLOSED' ? 'fixed' : 'filed';
28
+ if (f && f.swept) return 'swept';
28
29
  return 'open';
29
30
  }
30
31
  // filter = { status: 'open' (default) | 'all' | one of STATUSES, severity: 'all' | P0..P3, origin: 'all' | ORIGINS }
@@ -246,9 +247,10 @@
246
247
  };
247
248
  const statusCell = r => {
248
249
  const st = statusOf(r), box = el('span', undefined, 'fnd-status fnd-' + st);
249
- box.append(el('i', undefined, 'lamp ' + (st === 'filed' ? 'fnd-amber' : st === 'fixed' ? 'st-pass' : 'lamp-off')));
250
+ box.append(el('i', undefined, 'lamp ' + (st === 'filed' ? 'fnd-amber' : st === 'fixed' || st === 'swept' ? 'st-pass' : 'lamp-off')));
250
251
  if (st === 'dismissed') { box.title = r.dismissed.reason ? String(r.dismissed.reason) : 'dismissed'; box.append(el('span', 'dismissed')); return box; }
251
252
  if (st === 'open') { box.append(el('span', 'open')); return box; }
253
+ if (st === 'swept') { box.title = `fixed in the run by ${r.swept.task} (${r.swept.finding})`; box.append(el('span', 'swept')); return box; }
252
254
  const url = safeUrl(r.filed && r.filed.url), word = st === 'filed' ? 'filed' : 'fixed';
253
255
  if (url) { const a = el('a', word); a.href = url; a.target = '_blank'; a.rel = 'noopener noreferrer'; a.title = 'the GitHub issue (' + String(r.filed.state || 'state unknown').toLowerCase() + ')'; box.append(a); }
254
256
  else box.append(el('span', word));
@@ -26,6 +26,7 @@
26
26
  <script src="gantt.js" defer></script>
27
27
  <script src="controls.js" defer></script>
28
28
  <script src="verifyview.js" defer></script>
29
+ <script src="checksview.js" defer></script>
29
30
  <script src="panel.js" defer></script>
30
31
  <script src="diffview.js" defer></script>
31
32
  <script src="convo.js" defer></script>
@@ -5,11 +5,12 @@
5
5
  window.ForgePanel = (() => {
6
6
  'use strict';
7
7
  const RM = window.ForgeRunModel;
8
+ const C = window.ForgeChecks || null; // checksview.js: Now, checks, the scheduler
8
9
  const list = v => Array.isArray(v) ? v : [];
9
10
  const num = v => typeof v === 'number' && Number.isFinite(v) ? v : null;
10
11
  const display = v => v === null || v === undefined || v === '' ? '—' : typeof v === 'object' ? JSON.stringify(v, null, 2) : String(v);
11
12
  const STATUSES = new Set(['merged', 'pass', 'running', 'pending', 'fail', 'error', 'infra', 'timeout', 'unknown', 'invalidated', 'blocked',
12
- 'interrupted', 'nochanges', 'conflict', 'accepted', 'none', 'outdated']);
13
+ 'interrupted', 'nochanges', 'conflict', 'accepted', 'none', 'outdated', 'needs_input', 'waiting']);
13
14
  const cache = new Map(); // path → {data, error, at}
14
15
  function el(tag, text, className) {
15
16
  const node = document.createElement(tag);
@@ -85,6 +86,31 @@ window.ForgePanel = (() => {
85
86
  const s = section(host, 'Controls');
86
87
  muted(s, 'Read-only: this page cannot change the run.');
87
88
  }
89
+ // A task that stopped NEEDS_INPUT: the question it asked, and the command that answers it. forge-ui shows the
90
+ // command and never runs it; only the user's answer, passed to retry, resumes the task.
91
+ const shellWord = s => /^[\w@%+=:,./-]+$/.test(s) ? s : "'" + String(s).replace(/'/g, "'\\''") + "'";
92
+ function waitingSection(host, ctx, task) {
93
+ const s = section(host, 'Waiting for you');
94
+ muted(s, 'This task stopped for an answer only you can give. Nothing retries it until you answer.');
95
+ s.append(el('pre', task.needs_input != null ? task.needs_input : `The question is not recorded: tasks/${task.id}/needs_input.md is missing.`));
96
+ if (ctx.run.kind === 'solo') return;
97
+ const plan = ctx.run.path ? shellWord(ctx.run.path) : '<plan>';
98
+ const text = `forge-parallel.sh retry ${plan} ${shellWord(task.id)} --answer "…"`;
99
+ const copy = el('button', 'Copy command'); copy.type = 'button';
100
+ copy.addEventListener('click', async () => {
101
+ try { await navigator.clipboard.writeText(text); copy.textContent = 'Copied'; }
102
+ catch (_) { copy.textContent = 'Copy failed: select the command instead'; }
103
+ });
104
+ const line = el('div', undefined, 'waiting-cmd');
105
+ line.append(el('pre', text, 'cmd'), copy);
106
+ s.append(line);
107
+ }
108
+ // An attempt's chip. A failed attempt is red whatever its words; a send-back says what forge did in its title.
109
+ function attemptChip(word) {
110
+ const c = chip(word, RM.attemptFailed(word) ? 'fail' : undefined), note = RM.attemptNote(word);
111
+ if (note) c.title = note;
112
+ return c;
113
+ }
88
114
  // a link into the diff viewer (ctx.diffHash is absent where there is no viewer)
89
115
  function diffLink(ctx, text, spec, cls = 'diff-link') { if (!ctx.diffHash) return null; const a = el('a', text, cls); a.href = ctx.diffHash(spec); return a; }
90
116
  // a lazy resource: returns cached data, or starts the fetch and re-renders when it lands
@@ -153,6 +179,32 @@ window.ForgePanel = (() => {
153
179
  box.append(ul);
154
180
  parent.append(box);
155
181
  }
182
+ // forge's own run of the tests the attempt affects, before its review (opt-in plan --pre-review-tests).
183
+ const PRE_REVIEW = { passed: ['passed', 'pass'], flaky: ['flaky: passed when rerun alone', 'unknown'],
184
+ 'pre-existing': ['failing already on the task base', 'unknown'], failed: ['failed: sent back without a review', 'fail'],
185
+ skipped: ['skipped', 'unknown'], error: ['could not run', 'unknown'] };
186
+ function preReview(parent, pr) {
187
+ if (!pr) return;
188
+ const box = el('div', undefined, 'review');
189
+ const h = el('div', undefined, 'attempt-head');
190
+ const [label, cls] = PRE_REVIEW[pr.status] || [pr.status, 'unknown'];
191
+ h.append(el('strong', 'forge pre-review tests'), chip(label, cls));
192
+ if (typeof pr.seconds === 'number') h.append(el('span', `${pr.seconds.toFixed(1)}s`, 'muted'));
193
+ box.append(h);
194
+ if (pr.reason) muted(box, pr.reason);
195
+ if (pr.command) box.append(el('p', pr.command, 'mono muted'));
196
+ const ul = el('ul', undefined, 'findings');
197
+ for (const path of list(pr.selected)) {
198
+ const li = el('li');
199
+ li.append(el('span', path, 'mono'));
200
+ if (list(pr.failing).includes(path)) li.append(document.createTextNode(' '), chip('fails', 'fail'));
201
+ else if (list(pr.preexisting).includes(path)) li.append(document.createTextNode(' '), chip('fails on the base too', 'unknown'));
202
+ ul.append(li);
203
+ }
204
+ if (ul.childNodes.length) box.append(ul);
205
+ if (pr.status === 'failed' && pr.tail) box.append(el('pre', pr.tail, 'mono'));
206
+ parent.append(box);
207
+ }
156
208
  function findingsList(parent, findings, key) {
157
209
  if (findings === null || findings === undefined) { muted(parent, 'Findings could not be parsed (forge-contract.py was not available to the server).'); return; }
158
210
  if (!findings.length) { muted(parent, 'The reviewer reported no findings in the expected `- [P1][CONFIRMED] file:line — …` form.'); return; }
@@ -169,9 +221,11 @@ window.ForgePanel = (() => {
169
221
  });
170
222
  parent.append(ul);
171
223
  }
224
+ const gateChip = decision => decision === 'accept' ? chip('accept', 'pass')
225
+ : decision === 'fail' ? chip('forge: FAIL (reviewer said PASS)', 'fail') : chip(decision || '—', 'unknown');
172
226
  function gateLine(parent, gate) {
173
227
  if (!gate) return;
174
- fields(parent, [['Blocking threshold', gate.threshold], ['Gate decision', gate.decision === 'accept' ? chip('accept', 'pass') : chip(gate.decision || '—', 'unknown')],
228
+ fields(parent, [['Blocking threshold', gate.threshold], ['Gate decision', gateChip(gate.decision)],
175
229
  ['Worst confirmed', gate.worst], ['Confirmed / unlabelled / tolerated', `${display(gate.n_confirmed)} / ${display(gate.n_unlabelled)} / ${display(gate.n_below)}`]]);
176
230
  }
177
231
 
@@ -206,7 +260,7 @@ window.ForgePanel = (() => {
206
260
  const s = section(host, 'Settings');
207
261
  fields(s, [['Repo', midPath(run.repo), true], ['Run ID', run.run_id, true], ['Path', midPath(run.path), true], ['Source', run.source],
208
262
  ['Decompose', run.decompose_level], ['Updated', time(run.updated)], ['Explore', run.settings && run.settings.explore], ['Shadow rate', run.settings && run.settings.shadow_rate],
209
- ['Shadow reviewers', run.settings && plates(list(run.settings.shadow_qa))], ['QA threshold', run.settings && run.settings.qa_threshold],
263
+ ['Shadow reviewers', run.settings && plates(list(run.settings.shadow_qa))], ['QA threshold', run.settings && run.settings.qa_threshold && run.settings.qa_threshold + (run.settings.qa_threshold_source === 'default' ? ' (default)' : '')],
210
264
  ['Max parallel', run.settings && run.settings.max_parallel], ['Final reviewer', run.settings && run.settings.final_qa ? plate(run.settings.final_qa) : undefined],
211
265
  ['Timeout (seconds)', run.settings && run.settings.timeout], ['Verification', chip((run.verification && run.verification.status) || run.verification_status)],
212
266
  ['Command', run.verification && run.verification.command, true]]);
@@ -220,6 +274,7 @@ window.ForgePanel = (() => {
220
274
  const s = section(host, 'Timeline');
221
275
  fields(s, [['Started', time(tr && tr.start)], ['Last activity', time(tr && tr.end)], ['Wall time', tr ? RM.fmtDur(tr.end - tr.start) : '—'],
222
276
  ['Concurrency limit', run.settings && run.settings.max_parallel != null ? run.settings.max_parallel : (run.kind === 'solo' ? '—' : '3 (default; not recorded)')]]);
277
+ if (C) C.schedulerFields(s, run, now);
223
278
  if (run.kind !== 'solo') {
224
279
  const cp = RM.criticalPath(run, { now });
225
280
  if (cp.ids.length) {
@@ -250,8 +305,18 @@ window.ForgePanel = (() => {
250
305
  fields(f, [['Integration', link(`${F.integration.merged}/${F.integration.total} merged`, ctx.hash({ kind: 'integration' }), () => ctx.onSelect({ kind: 'integration' }))],
251
306
  ['Verification', link(F.verification.status, ctx.hash({ kind: 'verification' }), () => ctx.onSelect({ kind: 'verification' }))],
252
307
  ['Final review', finalValue]]);
308
+ const attribution = RM.attributionLine(run.attribution);
309
+ if (attribution) f.append(el('p', attribution, 'warn'));
253
310
  if (F.final.status === 'OUTDATED') muted(f, RM.reviewSinceLine(F.final));
254
311
  if (F.final.findings) findingCounts(f, F.final.findings);
312
+ const sweep = RM.sweepLine(run.sweep);
313
+ if (sweep) {
314
+ fields(f, [['Finding sweep', `${sweep} (${display(run.sweep.severity)} and worse)`]]);
315
+ const left = list(run.sweep.dropped);
316
+ if (left.length) details(f, `Left for forge issues by the sweep (${left.length})`,
317
+ left.map(d => `[${display(d.severity)}] ${display(d.location)} — ${display(d.summary)} (task ${display(d.task)}): ${display(d.reason)}${list(d.merged_since).length ? ' after ' + d.merged_since.join(', ') : ''}`).join('\n'),
318
+ 'sweep-left');
319
+ }
255
320
  }
256
321
  if (list(run.deferrals).length) details(host, `Deferred tasks (${run.deferrals.length})`, run.deferrals.join('\n'), 'deferrals');
257
322
  controlsSection(host, ctx);
@@ -259,6 +324,30 @@ window.ForgePanel = (() => {
259
324
  muted(host, 'Select a task, an attempt or a finish node on the map or in the table to see its prompts, models, timings and findings.');
260
325
  }
261
326
 
327
+ // A finding sweep's fix task: the findings it took and what its review said of each. A task whose findings a
328
+ // fix task took: which, and where that stands.
329
+ function sweepSection(host, ctx, task) {
330
+ const own = task.sweep && list(task.sweep.findings), took = list(task.swept);
331
+ if (!(own && own.length) && !took.length) return;
332
+ const s = section(host, own && own.length ? 'Finding sweep' : 'Taken by the finding sweep');
333
+ if (own && own.length) muted(s, `A fix task: the open findings of earlier tasks in ${display(task.sweep.file)}, with a narrow review of each.`);
334
+ const ul = el('ul', undefined, 'plain sweep-list');
335
+ for (const f of own && own.length ? own : took) {
336
+ const st = RM.sweepState(f.status), li = el('li', undefined, 'sweep-item');
337
+ const head = el('div', undefined, 'sweep-head');
338
+ head.append(el('i', undefined, 'lamp st-' + st.lamp), sevChip(f.severity || '—', f.severity), el('span', f.location || '—', 'mono sweep-where'));
339
+ li.append(head, el('p', f.summary || '', 'sweep-what'));
340
+ const meta = el('p', undefined, 'sweep-meta');
341
+ meta.append(document.createTextNode(`${f.id} · ${st.text}`));
342
+ const other = own && own.length ? f.task : f.by;
343
+ if (other) { meta.append(document.createTextNode(own && own.length ? ' · from ' : ' · by ')); meta.append(link(other, ctx.hash({ kind: 'task', id: other }), () => ctx.onSelect({ kind: 'task', id: other }))); }
344
+ if (f.note) meta.append(document.createTextNode(' — ' + f.note));
345
+ li.append(meta);
346
+ ul.append(li);
347
+ }
348
+ s.append(ul);
349
+ }
350
+
262
351
  function taskView(host, ctx, task) {
263
352
  const run = ctx.run, now = ctx.now, solo = run.kind === 'solo';
264
353
  const head = el('div', undefined, 'insp-head');
@@ -274,7 +363,10 @@ window.ForgePanel = (() => {
274
363
  head.append(chips);
275
364
  const dl = diffLink(ctx, solo ? 'View the diff →' : 'View its diff, findings pinned to their lines →', { kind: 'task', task: task.id, source: 'current' }); if (dl) head.append(dl);
276
365
  host.append(head);
366
+ if (RM.isWaiting(task.status)) waitingSection(host, ctx, task);
277
367
  if (!solo) fields(host, [['Difficulty', task.difficulty], ['Depends on', depLinks(task.deps, ctx)], ['Files', list(task.files).join('\n') || '—', true], ['Branch', task.branch, true]]);
368
+ if (C) C.nowSection(host, ctx, task);
369
+ sweepSection(host, ctx, task);
278
370
 
279
371
  // the models: who owned it, how it was routed, what it was escalated to
280
372
  const ms = section(host, 'Models');
@@ -298,10 +390,13 @@ window.ForgePanel = (() => {
298
390
  const as = section(host, 'Attempts');
299
391
  const tp = RM.taskParts(task), usedEscalations = new Set();
300
392
  if (!list(task.executions).length) muted(as, 'No executions recorded yet' + (task.status === 'PENDING' ? ': this task has not started.' : '.'));
393
+ // the checks each agent ran, read once for the whole task
394
+ const checks = C && list(task.executions).length ? C.taskChecks(ctx, task) : null;
395
+ if (checks) C.loadingLine(as, checks);
301
396
  for (const z of tp.zones) {
302
397
  const box = el('div', undefined, 'attempt');
303
398
  const row = list(task.attempts).filter(a => a.attempt === z.attempt).pop();
304
- const h = el('div', undefined, 'attempt-head'); h.append(el('strong', z.name.toLowerCase())); if (row) h.append(chip(RM.attemptStatus(task, row.attempt, row.status)), el('span', time(row.at), 'muted'));
399
+ const h = el('div', undefined, 'attempt-head'); h.append(el('strong', z.name.toLowerCase())); if (row) h.append(attemptChip(RM.attemptStatus(task, row.attempt, row.status)), el('span', time(row.at), 'muted'));
305
400
  box.append(h);
306
401
  for (const pid of z.parts) {
307
402
  const p = tp.parts.find(x => x.id === pid); if (!p || p.planned) continue;
@@ -320,7 +415,9 @@ window.ForgePanel = (() => {
320
415
  if ((p.kind === 'qa' || p.kind === 'shadow') && p.exec && p.exec.id) { const a = diffLink(ctx, 'diff it read', { kind: 'task', task: task.id, source: p.exec.id }, 'diff-link small'); if (a) go.append(a); }
321
416
  if (go.childElementCount) line.append(go);
322
417
  box.append(line);
418
+ if (checks && (p.kind === 'dwarf' || p.kind === 'qa') && p.exec && p.exec.id) C.underExecution(box, ctx, task, checks, z.attempt, p.exec.id);
323
419
  }
420
+ if (checks) C.attemptCriteria(box, checks, z.attempt);
324
421
  for (const l of tp.links.filter(l => l.kind === 'escalation' && z.parts.includes(l.to))) {
325
422
  const line = el('p', `escalated: ${l.label} `, 'muted');
326
423
  const e = list(task.escalations).find(x => !usedEscalations.has(x) && `${x.from || '?'} → ${x.to || '?'}` === l.label); // the link carries only its label
@@ -337,6 +434,7 @@ window.ForgePanel = (() => {
337
434
  gateLine(rs, task.gate);
338
435
  findingCounts(rs, task.findings);
339
436
  failFirst(rs, task.fail_first);
437
+ preReview(rs, task.pre_review);
340
438
  const detail = lazy(ctx, `/api/runs/${encodeURIComponent(run.key)}/tasks/${encodeURIComponent(task.id)}`, run.updated);
341
439
  if (!loading(rs, detail, 'the full findings')) {
342
440
  const reviews = list(detail.data.reviews);
@@ -351,19 +449,6 @@ window.ForgePanel = (() => {
351
449
  rs.append(box);
352
450
  });
353
451
  }
354
- // Clef: what was predicted, against what happened
355
- const clef = task.clef || {};
356
- const preds = [];
357
- if (clef.first_pass) preds.push(['First attempt', clef.first_pass]);
358
- for (const [a, p] of Object.entries(clef.retry_pass || {})) preds.push([`Retry · attempt ${a}`, p]);
359
- if (preds.length) {
360
- const cs = section(host, 'Clef predictions');
361
- for (const [label, p] of preds) {
362
- const n = Number(String(label).match(/\d+/) || 1), outcome = list(task.attempts).filter(a => a.attempt === n).pop();
363
- const happened = outcome ? RM.attemptStatus(task, outcome.attempt, outcome.status) : 'not finished';
364
- fields(cs, [[label, `p(pass) = ${display(p.p)} → ${happened}`], ['Assignment', p.assignment ? plates([p.assignment.dwarf, p.assignment.qa]) : '—']]);
365
- }
366
- }
367
452
  // the prompts and the final messages
368
453
  const ps = section(host, 'Prompts and output');
369
454
  if (!detail.data) details(ps, 'Requirements (prompt.md)', task.prompt, `task-${task.id}-prompt`);
@@ -418,6 +503,7 @@ window.ForgePanel = (() => {
418
503
  if (entry.data) findingsList(rs, entry.data.findings, `exec-${sel.exec}`); else loading(rs, entry, 'the findings');
419
504
  }
420
505
  }
506
+ if (C) C.execSection(host, ctx, task, sel, e);
421
507
  const ps = section(host, 'Prompt and output');
422
508
  if (loading(ps, entry, 'the prompt')) return;
423
509
  const d = entry.data;
@@ -558,6 +644,8 @@ window.ForgePanel = (() => {
558
644
  const head = el('div', undefined, 'insp-head');
559
645
  head.append(el('h2', 'Verification'), el('div', 'finish', 'insp-kind'), chip(v && v.status || 'pending'));
560
646
  host.append(head);
647
+ const attribution = RM.attributionLine(run.attribution);
648
+ if (attribution) host.append(el('p', attribution, 'warn'));
561
649
  if (!v) { muted(host, 'Verification has not run: it runs after every task is merged into the integration branch.'); return; }
562
650
  if (window.ForgeVerify) window.ForgeVerify.render(host, ctx); // live state, lanes and failing tests
563
651
  fields(host, [['Command', v.command, true], ['Commit', v.commit, true]]);
@@ -15,6 +15,9 @@
15
15
  const clamp = (v, a, b) => Math.max(a, Math.min(b, v));
16
16
  const DONE = new Set(['MERGED', 'PASS', 'NOCHANGES']);
17
17
  const BAD = new Set(['FAIL', 'ERROR', 'CONFLICT', 'INFRA', 'TIMEOUT', 'INVALIDATED', 'INTERRUPTED', 'UNKNOWN', 'BLOCKED']);
18
+ // NEEDS_INPUT: stopped for an answer only the user can give. Neither DONE nor BAD, so never a failure.
19
+ const WAITING = new Set(['NEEDS_INPUT']);
20
+ const isWaiting = status => WAITING.has(status);
18
21
  const WEIGHT = { low: 1, medium: 2, high: 3 };
19
22
  const weight = t => WEIGHT[String(t && t.difficulty || '').toLowerCase()] || 2;
20
23
  const alias = spec => spec ? String(spec).split(':')[0] : null;
@@ -73,6 +76,7 @@
73
76
  }
74
77
 
75
78
  /* ---------- statuses ---------- */
79
+ // A waiting task is in neither set: a run with nothing else left is pending, not failed and not done.
76
80
  function runState(run) {
77
81
  const counts = run && run.counts || {};
78
82
  if (counts.RUNNING) return 'live';
@@ -180,6 +184,8 @@
180
184
  if (statuses.some(s => s === 'RUNNING')) return 'RUNNING';
181
185
  if (statuses.every(s => s === 'MERGED')) return 'MERGED';
182
186
  if (statuses.some(s => s === 'PENDING' || s === 'PASS')) return 'PENDING';
187
+ // only answers are missing: the integration waits for the user, not for a fix
188
+ if (statuses.some(isWaiting) && statuses.every(s => s === 'MERGED' || isWaiting(s))) return 'WAITING';
183
189
  return 'BLOCKED';
184
190
  }
185
191
  // How one final review reads as a stage. OUTDATED only once it is done and the reader says the
@@ -226,6 +232,21 @@
226
232
  if (n !== null && want !== null && n === want) return 'ACCEPTED';
227
233
  return raw;
228
234
  }
235
+ // The send-backs forge writes into attempts.tsv without a reviewer's verdict. The task status stays FAIL, but each
236
+ // is a failed attempt with its own word, and a note says what forge did with it.
237
+ const SENT_BACK = new Map([['BOUNCED', 'sent back: the review left blocking findings unaddressed'],
238
+ ['INCOMPLETE', 'sent back: the dwarf said it did not finish']]);
239
+ const attemptNote = status => SENT_BACK.get(status) || null;
240
+ const attemptFailed = status => status === 'FAIL' || status === 'ERROR' || SENT_BACK.has(status);
241
+ // The run's attribution (attribution.json) as the line under its verification result, or null when it names nothing.
242
+ function attributionLine(a) {
243
+ if (!a || typeof a !== 'object') return null;
244
+ const n = num(a.verification_runs), runs = (word) => n === null ? '' : ` (${n} ${word}${n === 1 ? '' : 's'})`;
245
+ if (a.culprit) return `integration failure: merge ${a.culprit} breaks verification${runs('verification run')}`;
246
+ if (a.base_fails === true) return `the base already fails verification${runs('run')}`;
247
+ if (a.inconclusive) return `attribution inconclusive: ${a.inconclusive}${runs('run')}`;
248
+ return null;
249
+ }
229
250
  function shortTip(tip) {
230
251
  if (tip === null || tip === undefined || tip === '') return '—';
231
252
  return String(tip).slice(0, 7);
@@ -832,6 +853,22 @@
832
853
  return out;
833
854
  }
834
855
 
856
+ /* ---------- the finding sweep (run --sweep): what it fixed, and each finding's lamp ---------- */
857
+ // RunDetail.sweep → the run's one-line account, or null when the run was never swept
858
+ function sweepLine(sweep) {
859
+ if (!sweep) return null;
860
+ const tasks = list(sweep.tasks).length, n = num(sweep.findings) || 0, fixed = num(sweep.fixed) || 0;
861
+ const left = list(sweep.dropped).length + n - fixed;
862
+ if (!tasks) return `nothing to fix; ${left} left for forge issues`;
863
+ return `${tasks} fix task${tasks === 1 ? '' : 's'} · ${fixed} of ${n} finding${n === 1 ? '' : 's'} fixed · ${left} left for forge issues`;
864
+ }
865
+ // a swept finding's status → its lamp state (style.css .st-*) and what it says
866
+ const SWEEP_STATES = { fixed: ['pass', 'fixed'], 'not-fixed': ['fail', 'not fixed'], unreported: ['unknown', 'not reported by the review'] };
867
+ function sweepState(status) {
868
+ const s = SWEEP_STATES[status];
869
+ return s ? { lamp: s[0], text: s[1] } : { lamp: 'pending', text: 'its fix task has not merged' };
870
+ }
871
+
835
872
  /* ---------- Fractal: a task's child tasks as a tidy tree (depth across, siblings down) ---------- */
836
873
  // nodes: TaskFractal.nodes (tree order, parent ids); returns {pos: {id: {col, row, depth}}, edges: [[parent, child]], cols, rows}
837
874
  function fractalTree(nodes) {
@@ -857,7 +894,8 @@
857
894
  }
858
895
 
859
896
  return { liveNow, runState, execStatus, matchRun, filterOptions, atlasModel, columns, planModel, finishState,
860
- finalStatus, runReviewStatus, reviewSinceLine, reviewAt, taskStatus, taskVerdict, attemptStatus, taskParts,
897
+ finalStatus, runReviewStatus, reviewSinceLine, reviewAt, taskStatus, taskVerdict, attemptStatus, attemptNote, attemptFailed, isWaiting,
898
+ attributionLine, taskParts,
861
899
  taskTimes, metricValue, overlap, projectSchedule, execModel, verifyLeds, criticalPath, concurrency, stateAt, timeRange, events, lineage, structureKey, innerKey,
862
- fmtDur, alias, basename, weight, searchIndex, searchRank, statusEvents, fractalTree };
900
+ fmtDur, alias, basename, weight, searchIndex, searchRank, statusEvents, fractalTree, sweepLine, sweepState };
863
901
  });
@@ -167,6 +167,7 @@ export async function createStage(host, cb = {}) {
167
167
  const parts = [r.kind === 'solo' ? (Object.keys(c)[0] || 'solo') : `${merged}/${total} done`];
168
168
  if (running) parts.push(`${running} running`);
169
169
  if (bad) parts.push(`${bad} failed`);
170
+ if (c.NEEDS_INPUT) parts.push(`${c.NEEDS_INPUT} waiting for you`); // not in the failed count: it waits for an answer
170
171
  const reviewStatus = RM.runReviewStatus(r);
171
172
  if (reviewStatus) parts.push(`review ${reviewStatus}`);
172
173
  else if (r.verification_status) parts.push(`verify ${r.verification_status}`);
@@ -271,18 +272,6 @@ export async function createStage(host, cb = {}) {
271
272
  el.ledCount = tries;
272
273
  setLeds(el, attemptLamps(t).slice(-el.ledCount));
273
274
  display(el, taskLine, { w: w - 24, x: x + 12, y: y + d, z: h - 8 });
274
- // the Clef ring: how likely the first try was to pass, in the colour of what happened
275
- const p0 = t.clef && t.clef.first_pass && num(t.clef.first_pass.p);
276
- if (p0 !== null) {
277
- const cx0 = x + w - 22, cy0 = y + 22, rIn = 8, rOut = 11.5;
278
- const bgM = new THREE.MeshBasicMaterial({ color: E.DETAIL.clone(), toneMapped: false, transparent: true, polygonOffset: true, polygonOffsetFactor: -4, polygonOffsetUnits: -12 });
279
- const fgM = new THREE.MeshBasicMaterial({ color: 0xffffff, toneMapped: false, transparent: true, polygonOffset: true, polygonOffsetFactor: -5, polygonOffsetUnits: -14 });
280
- for (const [m, len] of [[bgM, Math.PI * 2], [fgM, Math.max(.05, Math.min(1, p0)) * Math.PI * 2]]) {
281
- const ring = E.noRay(new THREE.Mesh(new THREE.RingGeometry(rIn * TS, rOut * TS, 40, 1, Math.PI / 2, len), m));
282
- ring.rotation.x = -Math.PI / 2; ring.position.copy(W(cx0, cy0, h + .2)); el.cover.add(ring); el.M.labs.push(m);
283
- }
284
- el.clef = { fgM, p: p0 };
285
- }
286
275
  halo(el);
287
276
  return el;
288
277
  }
@@ -975,7 +964,6 @@ export async function createStage(host, cb = {}) {
975
964
  if (c.tint > .001) el.M.body.color.lerp(TMP2.copy(col), c.tint * c.vis);
976
965
  if (el.tintMat) { el.tintMat.color.copy(col); el.tintMat.opacity = (c.tint * (E.theme === 'light' ? 1.45 : 1.1) + .08 * c.sel) * ob * gf * c.vis; }
977
966
  if (el.haloMat) el.haloMat.uniforms.opacity.value = (c.halo + (el.pulse ? .12 * pulseK : 0)) * gf * c.vis;
978
- if (el.clef) el.clef.fgM.color.copy(E.statusColor(['MERGED', 'PASS', 'ACCEPTED'].includes(el.status) ? 'pass' : ['FAIL', 'ERROR', 'CONFLICT'].includes(el.status) ? 'fail' : 'pending'));
979
967
  if (el.inner) {
980
968
  const p = pr ? pr.p : 0, vis = p > .002;
981
969
  if (!vis && el.inner.visible) { E.release(el.inner); }
@@ -1260,7 +1248,7 @@ export async function createStage(host, cb = {}) {
1260
1248
  const lamps = { title: 'Lamps', rows: [
1261
1249
  { sw: { lamp: 'st-merged' }, label: 'merged · passed · accepted' }, { sw: { lamp: 'st-running' }, label: 'running · interrupted' },
1262
1250
  { sw: { lamp: 'st-fail' }, label: 'failed · conflict · infra · timeout' }, { sw: { lamp: 'st-pending' }, label: 'pending, not started' },
1263
- { sw: { lamp: 'st-outdated' }, label: 'outdated review' },
1251
+ { sw: { lamp: 'st-outdated' }, label: 'outdated review' }, { sw: { lamp: 'st-needs_input' }, label: 'waiting for you' },
1264
1252
  { sw: { route: true }, label: st.view === 'atlas' ? 'chosen run' : 'chosen task' + (L.route ? ' and its route' : '') }] };
1265
1253
  if (st.view === 'atlas') {
1266
1254
  out.push({ title: 'Map', rows: [], note: 'Each block is a run, each district a repository. The lamps on a block are its tasks; the block stands taller the more tasks it has.' }, lamps);
@@ -1283,7 +1271,6 @@ export async function createStage(host, cb = {}) {
1283
1271
  if (fs.some(it => it.plausible)) rows.push({ sw: { sev: 'P2', pale: true }, label: 'plausible: smaller, paler' });
1284
1272
  out.push({ title: 'Findings', rows, note: 'A click opens the diff at the finding.' });
1285
1273
  }
1286
- if (o.arcs && list(st.run.tasks).some(t => t.clef && t.clef.first_pass)) out.push({ title: 'Review marks', rows: [{ sw: { ring: true }, label: 'Clef ring: the chance the first try passes' }] });
1287
1274
  if (o.height !== 'none') {
1288
1275
  const mx = st.metricMax && st.metricMax[o.height];
1289
1276
  out.push({ title: 'Height', rows: [{ sw: { height: true }, label: `${o.height}: up to ${fmtMetric(o.height, mx)}` }] });