@feigi/fleet-ctl 3.146.0 → 3.147.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.
- package/package.json +1 -1
- package/scripts/compute-cell-evidence.mjs +11 -10
- package/scripts/fleet-tick.mjs +1 -1
- package/scripts/ledger-grammar.mjs +6 -0
- package/scripts/metrics-refresh.mjs +3 -4
- package/scripts/pr-cost.mjs +4 -5
- package/scripts/router-table.json +1 -2
- package/scripts/ticket-router.mjs +36 -42
- package/skills/run-team/references/pull.md +3 -1
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import { isDeepStrictEqual } from "node:util";
|
|
38
38
|
import { CELL, OBJECTIVES, POLICY_CELL } from "./ledger-grammar.mjs";
|
|
39
39
|
import { costGuardFault } from "./fleet-tick.mjs";
|
|
40
|
-
import { MIN_N, parseGuard, readGuard, rowDispatch } from "./ticket-router.mjs";
|
|
40
|
+
import { MIN_N, parseGuard, readGuard, rowDispatch, shortStartingCells } from "./ticket-router.mjs";
|
|
41
41
|
import { implementerCell, modelsEqual, parseModelRoute, resolveRole } from "./tier-roles.mjs";
|
|
42
42
|
|
|
43
43
|
// The implementer Cells, in the order the guard section draws them: one per
|
|
@@ -499,12 +499,13 @@ function routesSource(table, install, repoUrl) {
|
|
|
499
499
|
return { same, owner: named === null ? "another repository" : named.name, runs, text: [runs, fitted, installed].join(" · "), check };
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
// The Cells short of `MIN_N` merged PRs in the table's `guard.n
|
|
503
|
-
//
|
|
504
|
-
// its fit saw ("had"),
|
|
505
|
-
// workspace's own now ("has",
|
|
502
|
+
// The starting Cells short of `MIN_N` merged PRs in the table's `guard.n` — the
|
|
503
|
+
// Cells burn-in waits for, and no others — in their order, as one phrase: past
|
|
504
|
+
// tense for an installed table, whose counts are what its fit saw ("had"),
|
|
505
|
+
// present for the Fit, whose counts are the workspace's own now ("has",
|
|
506
|
+
// "have").
|
|
506
507
|
function shortWords(table, tense = "past") {
|
|
507
|
-
const short =
|
|
508
|
+
const short = shortStartingCells(table.guard.n);
|
|
508
509
|
if (short.length === 0) return null;
|
|
509
510
|
const each = short.length === 1 ? "it needs" : "each needs";
|
|
510
511
|
const one = tense === "past" ? "had" : "has";
|
|
@@ -527,7 +528,7 @@ function routesHeading(table, guard, source) {
|
|
|
527
528
|
if (!table.fitted_commit) return `never fitted: ${drawn}`;
|
|
528
529
|
const short = shortWords(table);
|
|
529
530
|
const ends = source.same ? "" : "; it ends with a later fit, reaching this install with a plugin release";
|
|
530
|
-
return `
|
|
531
|
+
return `burn-in at its fit on ${source.owner}'s runs: ${short === null ? "every starting Cell had its merged PRs" : short}; ${drawn}${ends}`;
|
|
531
532
|
}
|
|
532
533
|
|
|
533
534
|
// One row's dispatch, in the words a heading or a row carries: what `route` does
|
|
@@ -666,7 +667,7 @@ function refitLabel(step, p) {
|
|
|
666
667
|
// readGuard's answer for it, `table`, the installed one, and `records`, whether
|
|
667
668
|
// the fit read the guard's files: fitted beside another guard, on other records,
|
|
668
669
|
// or against another prior. The prior is
|
|
669
|
-
// compared only on what the fit takes from it — `
|
|
670
|
+
// compared only on what the fit takes from it — `cells`, `classifier`,
|
|
670
671
|
// `splits`, and `window_start` when the guard gives none — so a release that changes only
|
|
671
672
|
// what the fit recomputes, or `fitted_commit` and `version`, raises nothing: the
|
|
672
673
|
// next phase 0's refit would come out the same.
|
|
@@ -679,7 +680,7 @@ function fitLabels(p, raw, routed, table, records) {
|
|
|
679
680
|
labels.push("fitted against the installed table: not checked: no router table read");
|
|
680
681
|
return labels;
|
|
681
682
|
}
|
|
682
|
-
const read = ["
|
|
683
|
+
const read = ["cells", "classifier", "splits", ...(routed.window_start === null ? ["window_start"] : [])];
|
|
683
684
|
const prior = isRecord(p.prior) ? p.prior : {};
|
|
684
685
|
if (read.some((k) => !isDeepStrictEqual(prior[k], table[k]))) {
|
|
685
686
|
const version = prior.version === "0.0.0" ? "linked checkout" : (typeof prior.version === "string" ? prior.version : "no version");
|
|
@@ -733,7 +734,7 @@ function evidenceFavours({ fit: read, guard, routed, table, modelRoles, step, ma
|
|
|
733
734
|
return {
|
|
734
735
|
title: FAVOURS,
|
|
735
736
|
source: { text: ["Fit", "this repository's runs", `computed ${when(p.computed_at)}`, plural(fit.n_rows, "Pull")].join(" · "), check: null },
|
|
736
|
-
heading: fit.burn_in ? `
|
|
737
|
+
heading: fit.burn_in ? `burn-in: ${shortWords(fit, "present") ?? "every starting Cell has its merged PRs"}` : null,
|
|
737
738
|
labels: [...refitLabel(step, p), ...fitLabels(p, raw, routed, table, records)],
|
|
738
739
|
footnotes: differ.length === 0 ? [] : [{ mark, text: `${list(differ)}: the guard counts merges by GitHub's state, the fit by Rulings, and the fit admits only drawn or rule-sized Pulls` }],
|
|
739
740
|
rows: Object.fromEntries(OBJECTIVES.map((o) => [o,
|
package/scripts/fleet-tick.mjs
CHANGED
|
@@ -527,7 +527,7 @@ export function routerRows(s) {
|
|
|
527
527
|
const usd = (x) => (x === null ? "n/a" : `$${x.toFixed(2)}`);
|
|
528
528
|
const vs = (c) => `${c.cell} ${usd(c.mean_usd)} vs ${usd(b.mean_usd)}, fail ${pct(c.fail_rate)} vs ${pct(b.fail_rate)}, n=${c.n}/${b.n}`;
|
|
529
529
|
if (verdict === "tripped") {
|
|
530
|
-
const retired = g.guard.retire ? "; every non-default
|
|
530
|
+
const retired = g.guard.retire ? "; every non-default starting Cell tripped — the router retires" : "";
|
|
531
531
|
return row("DEFAULT-ONLY", `cost guard: ${cells.filter((c) => tripped.includes(c.cell)).map(vs).join("; ")}${retired}; ${age}`);
|
|
532
532
|
}
|
|
533
533
|
const others = cells.filter((c) => c.cell !== b.cell);
|
|
@@ -854,6 +854,12 @@ export const CELL_DEF = new RegExp(`^fleet-implementer-${CELL.source.slice(1)}`)
|
|
|
854
854
|
// bare row to.
|
|
855
855
|
export const POLICY_CELL = "slow-high";
|
|
856
856
|
|
|
857
|
+
// The Cells burn-in covers: the three models at `high`. A Cell exploration adds
|
|
858
|
+
// is none of them, whatever its merged PRs: burn-in neither draws it nor waits
|
|
859
|
+
// for it. Exported so ticket-router.mjs's burn-in and pr-cost.mjs's retire
|
|
860
|
+
// condition read one list, though neither script imports the other.
|
|
861
|
+
export const STARTING_CELLS = Object.freeze(["slow-high", "task-high", "smol-high"]);
|
|
862
|
+
|
|
857
863
|
// The Exploration Pull's draw: uniform over every cell but
|
|
858
864
|
// `policyCell`, keyed off the row's own `session` and `ticket`, so the draw
|
|
859
865
|
// is reproducible from the row and a re-dispatch of the same ticket in the
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
// `guard` (the guard it used, as the router reads it: its `computed_at`,
|
|
71
71
|
// `tripped`, per-Cell `n` and `window_start`), `tsv_blobs` (the git blob id of
|
|
72
72
|
// each TSV it read, keyed by path as the guard keys its own), `prior` (the
|
|
73
|
-
// starting table's `fitted_commit`, `
|
|
74
|
-
//
|
|
73
|
+
// starting table's `fitted_commit`, `cells`, `classifier`, `splits` and
|
|
74
|
+
// `window_start`, and the install's `package.json` `version`) and the
|
|
75
75
|
// fitted `table`. `ticket-router.mjs route` routes by that `table`, read
|
|
76
76
|
// beside the guard; nothing commits the file. The Fit is a pure function of
|
|
77
77
|
// those records: the TSVs at the recorded blob ids, the guard and the prior
|
|
@@ -318,7 +318,6 @@ export function writeFit(repo, written, { tablePath = DEFAULT_TABLE, packagePath
|
|
|
318
318
|
prior: {
|
|
319
319
|
fitted_commit: prior.fitted_commit,
|
|
320
320
|
version: installVersion(packagePath),
|
|
321
|
-
stage: prior.stage,
|
|
322
321
|
cells: prior.cells,
|
|
323
322
|
classifier: prior.classifier,
|
|
324
323
|
splits: prior.splits,
|
|
@@ -342,7 +341,7 @@ function fit(repo, written) {
|
|
|
342
341
|
} catch (e) {
|
|
343
342
|
return say(`fit: failed — ${e.message}`);
|
|
344
343
|
}
|
|
345
|
-
say(`fit: fitted ${p.table.n_rows} Pull${p.table.n_rows === 1 ? "" : "s"}
|
|
344
|
+
say(`fit: fitted ${p.table.n_rows} Pull${p.table.n_rows === 1 ? "" : "s"}${p.table.burn_in ? ", in burn-in" : ""}; ${FIT} computed ${p.computed_at}`);
|
|
346
345
|
}
|
|
347
346
|
|
|
348
347
|
function main() {
|
package/scripts/pr-cost.mjs
CHANGED
|
@@ -88,6 +88,7 @@ import { fleetFile, FleetDirUnresolvable } from "./fleet-dir.mjs";
|
|
|
88
88
|
import { isCLI } from "./is-cli.mjs";
|
|
89
89
|
import { parseTsv as parseMemberTsv } from "./member-outcomes.mjs";
|
|
90
90
|
import { AttributionError, TRIP_POINTS, attribute, bootUnit, bootstrapDiffCI, parseFeatures, tally, underFloor } from "./pull-attribution.mjs";
|
|
91
|
+
import { STARTING_CELLS } from "./ledger-grammar.mjs";
|
|
91
92
|
import { RulingError, parseTierOutcomes } from "./tier-outcomes.mjs";
|
|
92
93
|
|
|
93
94
|
const NAME = "pr-cost";
|
|
@@ -97,8 +98,6 @@ const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
|
97
98
|
// this constant in a reviewed change.
|
|
98
99
|
export const WINDOW_START = "2026-10-03";
|
|
99
100
|
export const BASELINE_CELL = "slow-high";
|
|
100
|
-
// Stage 1 is the model axis at fixed `high`.
|
|
101
|
-
export const STAGE_1 = ["slow-high", "task-high", "smol-high"];
|
|
102
101
|
export const MIN_N = 20;
|
|
103
102
|
export const EXIT = { ok: 0, tripped: 3, none: 4 };
|
|
104
103
|
export const GH_PR_LIMIT = 1000;
|
|
@@ -221,10 +220,10 @@ export function computeReport({ members, tiers, features, prs, routerTable = nul
|
|
|
221
220
|
}
|
|
222
221
|
}
|
|
223
222
|
const verdict = baseline.n < MIN_N ? "none" : tripped.length ? "tripped" : "ok";
|
|
224
|
-
// Retire: every non-default
|
|
223
|
+
// Retire: every non-default starting Cell tripped before any row of either
|
|
225
224
|
// objective's set adopted one.
|
|
226
225
|
const adopted = Object.values(routerTable?.rows ?? {}).some((set) => Object.values(set).some((c) => c !== BASELINE_CELL));
|
|
227
|
-
const retire = !adopted &&
|
|
226
|
+
const retire = !adopted && STARTING_CELLS.filter((c) => c !== BASELINE_CELL).every((c) => tripped.includes(c));
|
|
228
227
|
|
|
229
228
|
return {
|
|
230
229
|
window_start: windowStart,
|
|
@@ -312,7 +311,7 @@ export function formatReport(report) {
|
|
|
312
311
|
for (const o of f.older) lines.push(line(o, "older"));
|
|
313
312
|
}
|
|
314
313
|
const b = report.baseline;
|
|
315
|
-
lines.push(`# verdict: ${report.verdict} (baseline ${b.cell} n=${b.n}/${MIN_N}${report.tripped.length ? `; tripped ${report.tripped.join(" ")}` : ""})${report.retire ? " — retire: every non-default
|
|
314
|
+
lines.push(`# verdict: ${report.verdict} (baseline ${b.cell} n=${b.n}/${MIN_N}${report.tripped.length ? `; tripped ${report.tripped.join(" ")}` : ""})${report.retire ? " — retire: every non-default starting Cell tripped" : ""}`);
|
|
316
315
|
lines.push(`# window_start ${report.window_start}; pending PRs: ${report.pending.length ? report.pending.join(" ") : "none"}`);
|
|
317
316
|
const ab = report.ab;
|
|
318
317
|
lines.push(ab.status === "not-run"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"window_start": "2026-10-03",
|
|
3
3
|
"fitted_commit": "e5040b9a96d304b3ce8a40c2b2d35b143f66d450",
|
|
4
4
|
"n_rows": 268,
|
|
5
|
-
"stage": 2,
|
|
6
5
|
"cells": [
|
|
7
6
|
"slow-high",
|
|
8
7
|
"task-high",
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
"slow-medium",
|
|
11
10
|
"task-max"
|
|
12
11
|
],
|
|
13
|
-
"burn_in":
|
|
12
|
+
"burn_in": false,
|
|
14
13
|
"splits": {},
|
|
15
14
|
"rows": {
|
|
16
15
|
"cost": {
|
|
@@ -60,7 +60,7 @@ import { isDeepStrictEqual } from "node:util";
|
|
|
60
60
|
import { isCLI } from "./is-cli.mjs";
|
|
61
61
|
import { gitEnv } from "./git-env.mjs";
|
|
62
62
|
import { makeDie, defineFlags } from "./arg.mjs";
|
|
63
|
-
import { CELL, OBJECTIVES, POLICY_CELL, drawCell, formatRouting, isRulePath, parseMember } from "./ledger-grammar.mjs";
|
|
63
|
+
import { CELL, OBJECTIVES, POLICY_CELL, STARTING_CELLS, drawCell, formatRouting, isRulePath, parseMember } from "./ledger-grammar.mjs";
|
|
64
64
|
import { objectiveFromReceipt, sessionFromReceipt } from "./phase0-receipt.mjs";
|
|
65
65
|
import { parseTsv as parseMemberTsv } from "./member-outcomes.mjs";
|
|
66
66
|
import {
|
|
@@ -81,8 +81,10 @@ const EXPLORE_EVERY = 5;
|
|
|
81
81
|
export const MIN_N = 20;
|
|
82
82
|
const ADOPT_RATIO = 0.75;
|
|
83
83
|
export const FIT_EVERY_MERGED = 50;
|
|
84
|
-
//
|
|
85
|
-
|
|
84
|
+
// The starting Cells short of MIN_N merged PRs in a guard's `n`, each with its
|
|
85
|
+
// count, in their order: burn-in holds while any is. A Cell the guard has no
|
|
86
|
+
// count for has 0.
|
|
87
|
+
export const shortStartingCells = (n) => STARTING_CELLS.map((c) => [c, n[c] ?? 0]).filter(([, k]) => k < MIN_N);
|
|
86
88
|
const KINDS = new Set(["bug", "enhancement", "documentation"]);
|
|
87
89
|
const DAY_MS = 86_400_000;
|
|
88
90
|
|
|
@@ -350,7 +352,6 @@ export function validateTable(t) {
|
|
|
350
352
|
}
|
|
351
353
|
}
|
|
352
354
|
if (typeof t.burn_in !== "boolean") return bad("`burn_in` is not a boolean");
|
|
353
|
-
if (!Number.isInteger(t.stage) || t.stage < 1) return bad("`stage` is not a positive integer");
|
|
354
355
|
const cl = t.classifier;
|
|
355
356
|
if (cl === null || typeof cl !== "object") return bad("`classifier` is not an object");
|
|
356
357
|
if (cl.b !== null && cl.b !== "haiku" && cl.b !== "jev") return bad("`classifier.b` is not null, \"haiku\" or \"jev\"");
|
|
@@ -374,13 +375,20 @@ export function bArmLive(table, objective) {
|
|
|
374
375
|
/** The row a group routes by: its own, else the `*` row's — as a name no node of the table holds does, such as a group a Routing filed under another table names. */
|
|
375
376
|
export const rowFor = (rows, stratum) => rows[stratum] ?? rows["*"];
|
|
376
377
|
|
|
378
|
+
/**
|
|
379
|
+
* The Cells an exploring Pull may draw, before the guard's tripped Cells (and, after burn-in, the policy Cell) leave
|
|
380
|
+
* any out: burn-in draws the starting Cells, whatever `cells` the table holds, and a draw after it the table's own.
|
|
381
|
+
* The fit judges `burn_in` over the same starting Cells, so the Cells that end burn-in are the Cells it draws.
|
|
382
|
+
*/
|
|
383
|
+
const drawPool = (table) => (table.burn_in ? STARTING_CELLS : table.cells);
|
|
384
|
+
|
|
377
385
|
/**
|
|
378
386
|
* What `route` does with one row under one guard, with no per-Pull input.
|
|
379
387
|
* `guard` is readGuard's answer or null. `policy` is the row's Cell, or the
|
|
380
388
|
* default cell when there is no guard or the row's Cell is tripped; `reason`
|
|
381
389
|
* is `guard-missing`, `table-cell-tripped` or `ok`. `draw` is what an
|
|
382
390
|
* exploring Pull picks from — `by` `burn-in` (every Pull) or `every-5th` —
|
|
383
|
-
* over `cells`:
|
|
391
|
+
* over `cells`: drawPool()'s Cells less the tripped, and on an every-5th draw
|
|
384
392
|
* less the `cost` row's Cell for the stratum too, as the guard leaves it (the
|
|
385
393
|
* default cell when that row's Cell is tripped), whichever objective routes
|
|
386
394
|
* the row. It is null with no guard and when no Cell is left to draw.
|
|
@@ -392,7 +400,7 @@ export function rowDispatch({ table, guard, objective, stratum }) {
|
|
|
392
400
|
const adjust = (cell) => (tripped.has(cell) ? POLICY_CELL : cell);
|
|
393
401
|
const row = rowFor(table.rows[objective], stratum);
|
|
394
402
|
const by = table.burn_in ? "burn-in" : "every-5th";
|
|
395
|
-
const left = table.
|
|
403
|
+
const left = drawPool(table).filter((c) => !tripped.has(c));
|
|
396
404
|
const cells = table.burn_in ? left : left.filter((c) => c !== adjust(rowFor(table.rows.cost, stratum)));
|
|
397
405
|
return {
|
|
398
406
|
policy: adjust(row),
|
|
@@ -531,7 +539,7 @@ export function route({
|
|
|
531
539
|
const exploring = table.burn_in || (implRow % EXPLORE_EVERY === 0 && !chainHead);
|
|
532
540
|
if (exploring) {
|
|
533
541
|
const policyCell = table.burn_in ? null : drawRow.policy;
|
|
534
|
-
if (table.
|
|
542
|
+
if (drawPool(table).some((c) => c !== policyCell && guard.tripped.includes(c))) degrade("guard-tripped");
|
|
535
543
|
if (drawRow.draw !== null) {
|
|
536
544
|
// rowDispatch already left the policy Cell out of `cells`: nothing more to withhold.
|
|
537
545
|
const d = drawCell({ session, ticket, policyCell: null, cells: drawRow.draw.cells });
|
|
@@ -772,7 +780,10 @@ function judgeSpeedRow(est, pulls, cells, tripped, costCell) {
|
|
|
772
780
|
* `reasons.speed` holds `judgeSpeedRow()`'s record for each node with a `cost`
|
|
773
781
|
* row of its own (the root always has one), from that row's cell, the base when
|
|
774
782
|
* the record has no cell; a node with none holds its parent's `speed` row and
|
|
775
|
-
* an `unjudged` record.
|
|
783
|
+
* an `unjudged` record. `cells` is the prior's: the fit adds no Cell. `burn_in`
|
|
784
|
+
* holds until every starting Cell has MIN_N merged PRs on its newest generation
|
|
785
|
+
* (`guard.n`, which starts again at 0 when a role's model changes): no other
|
|
786
|
+
* Cell the table holds ends it or holds it, whatever its merged PRs.
|
|
776
787
|
*/
|
|
777
788
|
export function fitTable({ prior, features, members, verdicts, guard, commit = null }) {
|
|
778
789
|
const window = guard.window_start ?? prior.window_start ?? null;
|
|
@@ -781,44 +792,27 @@ export function fitTable({ prior, features, members, verdicts, guard, commit = n
|
|
|
781
792
|
const { estimates, pulls } = estimate(units, order, nodes);
|
|
782
793
|
const tripped = new Set(guard.tripped);
|
|
783
794
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
const
|
|
788
|
-
const
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
rows.speed[s] = speedCell;
|
|
799
|
-
reasons.cost[s] = { ...cost, cell: costCell };
|
|
800
|
-
reasons.speed[s] = { ...speed, cell: speedCell };
|
|
801
|
-
}
|
|
802
|
-
return { rows, reasons };
|
|
803
|
-
};
|
|
804
|
-
let { rows, reasons } = judgeRows();
|
|
805
|
-
const atN = (c) => (guard.n[c] ?? 0) >= MIN_N;
|
|
806
|
-
const adopted = Object.values(rows).some((set) => set["*"] !== POLICY_CELL);
|
|
807
|
-
if (stage === 1 && cells.every(atN) && (adopted || cells.some((c) => tripped.has(c)))) {
|
|
808
|
-
stage = 2;
|
|
809
|
-
for (const { cell, survives } of STAGE2) {
|
|
810
|
-
if (!cells.includes(cell) && cells.includes(survives) && !tripped.has(survives)) cells.push(cell);
|
|
811
|
-
}
|
|
812
|
-
// The stage-2 cells were added after the rows were judged: judge the rows again over the new `cells`.
|
|
813
|
-
({ rows, reasons } = judgeRows());
|
|
795
|
+
// The rows and their reasons over the table's `cells`: a fitted table's `reasons` cover exactly its `cells`.
|
|
796
|
+
const rows = { cost: {}, speed: {} };
|
|
797
|
+
const reasons = { cost: {}, speed: {} };
|
|
798
|
+
for (const s of nodes) {
|
|
799
|
+
const up = parentOf(s);
|
|
800
|
+
const cost = judgeRow(estimates[s], pulls[s], prior.cells, tripped);
|
|
801
|
+
const own = cost.cell !== null || up === null;
|
|
802
|
+
const costCell = cost.cell ?? (up === null ? POLICY_CELL : rows.cost[up]);
|
|
803
|
+
const speed = own ? judgeSpeedRow(estimates[s], pulls[s], prior.cells, tripped, costCell) : unjudged();
|
|
804
|
+
const speedCell = speed.cell ?? (own ? costCell : rows.speed[up]);
|
|
805
|
+
rows.cost[s] = costCell;
|
|
806
|
+
rows.speed[s] = speedCell;
|
|
807
|
+
reasons.cost[s] = { ...cost, cell: costCell };
|
|
808
|
+
reasons.speed[s] = { ...speed, cell: speedCell };
|
|
814
809
|
}
|
|
815
810
|
return {
|
|
816
811
|
window_start: window,
|
|
817
812
|
fitted_commit: commit,
|
|
818
813
|
n_rows: units.length,
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
burn_in: !cells.every(atN),
|
|
814
|
+
cells: prior.cells,
|
|
815
|
+
burn_in: shortStartingCells(guard.n).length > 0,
|
|
822
816
|
splits: prior.splits,
|
|
823
817
|
rows,
|
|
824
818
|
classifier: prior.classifier,
|
|
@@ -1072,7 +1066,7 @@ function main() {
|
|
|
1072
1066
|
const next = joined(() => fitTable({ prior: table, features, members, verdicts, guard, commit: sha }));
|
|
1073
1067
|
writeFileSync(`${tablePath}.tmp`, `${JSON.stringify(next, null, 2)}\n`);
|
|
1074
1068
|
renameSync(`${tablePath}.tmp`, tablePath);
|
|
1075
|
-
process.stdout.write(`${NAME}: fitted ${next.n_rows} Pulls at ${short(sha)}; rows ${JSON.stringify(next.rows)}; burn_in ${next.burn_in};
|
|
1069
|
+
process.stdout.write(`${NAME}: fitted ${next.n_rows} Pulls at ${short(sha)}; rows ${JSON.stringify(next.rows)}; burn_in ${next.burn_in}; cells ${cellCounts(next.estimates)}\n${rowLines(next.reasons)}`);
|
|
1076
1070
|
}
|
|
1077
1071
|
|
|
1078
1072
|
if (isCLI(import.meta.url)) main();
|
|
@@ -449,7 +449,9 @@ is an Exploration Pull, and the router draws its cell: `k = 1 +
|
|
|
449
449
|
(sha256("<session>\t<ticket>")[0:8] mod K)` over the routing table's
|
|
450
450
|
`cells` minus the policy cell, in token order. Under either Objective that
|
|
451
451
|
policy cell is the `cost` row set's, so the draw is the same under both. While the table's `burn_in` is
|
|
452
|
-
true every Pull draws, over
|
|
452
|
+
true every Pull draws, over the starting cells (the three models at `high`) the
|
|
453
|
+
guard has not tripped, the policy cell included; a cell the table lists beyond
|
|
454
|
+
them is never drawn. An
|
|
453
455
|
Exploration Pull records `tier=<cell>` in the row, and a replacement inherits the row's tier —
|
|
454
456
|
written at the Pull's row step, ahead of `ledger.mjs dispatch`, which reads it
|
|
455
457
|
and prints `fleet-implementer-<cell>` as the `agent` to dispatch. A Pull the
|