feat(config): modes - a mode is an artifact kind, the lenses it runs and its effort
The config defines the modes (modes.<name>): the kind of artifact the mode reviews - reply, series or commits, the three shipped partitions; a kind is a mode of its own name - the lenses it runs, in its kind's gate order, and the effort it runs at, else the kind's default (max for a reply or a series, xhigh for a commit range). `run --mode` names any of them, the dump records mode and kind, and everything that decided by the mode's name - the partition and hash, the prompts, the schemas, the disposition and reuse-key rules, what the CLI requires - decides by the kind. Every lens stays off until a mode lists it; lenses.<name>.run is retired with a warning that says so, and a lens of another kind, a name that is no lens, a lens listed twice and an unknown effort are config problems. The defaults run no lens; the template ships the three kinds as modes with every lens of their kind at the kind's effort, to trim (the owner's ruling of 2026-11-01), and init says so as it writes it - a kept config is the repository's own, and only one that lists no lens gets a step. The readers of the retired key follow: the CI smoke config, the shipped skill, the procedure (its description of the config as well as its mechanics), the manifest template, the run's messages and the comments that named the three modes. The run lock, the run numbers and the dump names are the kind's, so one full run per hash holds across the modes of a kind and their rounds count on together; the dump says which mode ran. The database broker starts for a lens the mode runs, as every other reader of the lenses off reads them. A named mode runs through the CLI in the kernel-modes test.
This commit is contained in:
parent
6cf15919db
commit
d5e54ffeb3
25 changed files with 1277 additions and 711 deletions
|
|
@ -173,6 +173,7 @@ namespace Crafter::Review::Run {
|
|||
return {
|
||||
{"config", opt(a.config)},
|
||||
{"mode", a.mode},
|
||||
{"kind", a.kind},
|
||||
{"subsystem", opt(a.subsystem)},
|
||||
{"artifact", a.artifact},
|
||||
{"hash", opt(a.hash)},
|
||||
|
|
@ -331,12 +332,12 @@ namespace Crafter::Review::Run {
|
|||
a = std::move(given);
|
||||
cfg = std::move(config);
|
||||
// The lens files the config turns off, and the environment of each.
|
||||
off = Config::LensesOff(cfg);
|
||||
off = Config::LensesOff(cfg, a.mode);
|
||||
environments = Config::Environments(cfg);
|
||||
}
|
||||
|
||||
bool Run::Kernel() const {
|
||||
return Plan::IsKernelMode(a.mode);
|
||||
return Plan::IsKernelKind(a.kind);
|
||||
}
|
||||
|
||||
Run::~Run() {
|
||||
|
|
@ -380,10 +381,10 @@ namespace Crafter::Review::Run {
|
|||
// ---- Gate 0 -------------------------------------------------------------------------
|
||||
void Run::Gate0() {
|
||||
if (!fs::exists(a.artifact)) Die(std::format("artifact {} does not exist", a.artifact));
|
||||
hash = Artifact::ArtifactHash(a.mode, a.artifact);
|
||||
hash = Artifact::ArtifactHash(a.kind, a.artifact);
|
||||
if (a.hash && !a.hash->empty() && *a.hash != hash) Die(std::format("--hash {} does not match the artifact ({})", Dyn::Slice(*a.hash, 0, 12), hash.substr(0, 12)));
|
||||
h8 = hash.substr(0, 8);
|
||||
if (a.mode == "commits") {
|
||||
if (a.kind == "commits") {
|
||||
// The lenses read the live checkout named first in --trees: it
|
||||
// must be the range HEAD the artifact was cut from, and clean -
|
||||
// anything else is evidence the review never saw (re-checked
|
||||
|
|
@ -398,11 +399,11 @@ namespace Crafter::Review::Run {
|
|||
}
|
||||
// A reply's gate-state sits beside the draft; a directory artifact's
|
||||
// inside it.
|
||||
gateDir = Dyn::JoinPath(a.mode == "reply" ? Dyn::DirName(a.artifact) : a.artifact, "gate-state");
|
||||
gateDir = Dyn::JoinPath(a.kind == "reply" ? Dyn::DirName(a.artifact) : a.artifact, "gate-state");
|
||||
fs::create_directories(gateDir);
|
||||
Inventory::Built built;
|
||||
try {
|
||||
built = Inventory::Build(a.mode, a.artifact);
|
||||
built = Inventory::Build(a.kind, a.artifact);
|
||||
} catch (const Inventory::InvariantError& e) {
|
||||
Die(e.what());
|
||||
} catch (const Dyn::Error& e) {
|
||||
|
|
@ -430,19 +431,23 @@ namespace Crafter::Review::Run {
|
|||
// same, clobber the resume file and buy every pass twice. The lock is
|
||||
// the kernel's: a killed driver releases it, no lens child inherits it.
|
||||
// A test or dry run takes none but numbers itself past a live holder.
|
||||
// The lock, the run numbers and the dump names are the kind's: the
|
||||
// gate-state is shared by every mode of a kind, so one full run per
|
||||
// hash holds across them and their rounds count on together; the dump
|
||||
// says which mode ran (2026-11-01, the first self-review).
|
||||
Json holder;
|
||||
if (!a.dryRun && !testMode) {
|
||||
try {
|
||||
runLock = std::make_unique<State::RunLock>(gateDir, a.mode, h8);
|
||||
runLock = std::make_unique<State::RunLock>(gateDir, a.kind, h8);
|
||||
} catch (const State::RunLocked& e) {
|
||||
const std::string how = Platform::InSandbox() ? std::format("wait for it or stop it (`{} stop <its scratch dir>`)", Invocation()) : std::string("wait for it or kill it");
|
||||
Die(std::format("a full run on this hash is already live in {}: {} - {}; a dead holder releases the lock", Dyn::RelPath(gateDir.string(), repo.string()), e.what(), how));
|
||||
}
|
||||
} else {
|
||||
const std::optional<Json> found = State::LockHolder(gateDir, a.mode, h8);
|
||||
const std::optional<Json> found = State::LockHolder(gateDir, a.kind, h8);
|
||||
if (found) holder = *found;
|
||||
}
|
||||
std::int64_t runN = State::NextRunNumber(gateDir, a.mode, h8);
|
||||
std::int64_t runN = State::NextRunNumber(gateDir, a.kind, h8);
|
||||
if (Dyn::Truthy(holder) && Dyn::Truthy(Dyn::Get(holder, "run_n"))) runN = std::max(runN, Int(holder.at("run_n")) + 1);
|
||||
const fs::path scratchRoot = ScratchRoot(a.scratch);
|
||||
// A run killed before its first checkpoint left no dump but did leave
|
||||
|
|
@ -460,7 +465,7 @@ namespace Crafter::Review::Run {
|
|||
// run that bought nothing (no outputs in its dir) would otherwise have
|
||||
// its number taken again and its dump written over.
|
||||
auto dumped = [&](std::int64_t n) {
|
||||
return fs::exists(gateDir / std::format("{}-{}-run-{}.json", a.mode, h8, n)) || fs::exists(gateDir / std::format("{}-{}-run-{}-test.json", a.mode, h8, n));
|
||||
return fs::exists(gateDir / std::format("{}-{}-run-{}.json", a.kind, h8, n)) || fs::exists(gateDir / std::format("{}-{}-run-{}-test.json", a.kind, h8, n));
|
||||
};
|
||||
while (!a.dryRun) {
|
||||
const fs::path candidate = scratchRoot / std::format("{}-run-{}", h8, runN);
|
||||
|
|
@ -488,7 +493,7 @@ namespace Crafter::Review::Run {
|
|||
const std::lock_guard guard(shared);
|
||||
stopFile = scratch / "stop";
|
||||
}
|
||||
dumpPath = a.dryRun ? scratch / "dry-run.json" : gateDir / std::format("{}-{}-run-{}{}.json", a.mode, h8, runN, testMode ? "-test" : "");
|
||||
dumpPath = a.dryRun ? scratch / "dry-run.json" : gateDir / std::format("{}-{}-run-{}{}.json", a.kind, h8, runN, testMode ? "-test" : "");
|
||||
if (runLock) {
|
||||
runLock->WriteInfo({{"pid", Platform::PublishedPid()},
|
||||
{"since", Platform::LocalTime("%Y-%m-%dT%H:%M:%S")},
|
||||
|
|
@ -497,18 +502,18 @@ namespace Crafter::Review::Run {
|
|||
{"run_n", runN}});
|
||||
}
|
||||
logFile = scratch / "log.txt";
|
||||
log(std::format("crafter-review {} prompt v{}: {} {} @ {}", Version(), PromptVersion, a.mode, Dyn::RelPath(a.artifact, repo.string()), hash));
|
||||
log(std::format("crafter-review {} prompt v{}: {}{} {} @ {}", Version(), PromptVersion, a.mode, a.mode == a.kind ? std::string() : std::format(" (a {})", a.kind), Dyn::RelPath(a.artifact, repo.string()), hash));
|
||||
std::error_code canonical;
|
||||
if (a.mode == "commits" && fs::weakly_canonical(reviewed, canonical) != fs::weakly_canonical(repo, canonical)) log(std::format("repository under review: {} (read at {})", reviewed.string(), trees.front()));
|
||||
if (a.kind == "commits" && fs::weakly_canonical(reviewed, canonical) != fs::weakly_canonical(repo, canonical)) log(std::format("repository under review: {} (read at {})", reviewed.string(), trees.front()));
|
||||
log(std::format("config: {}", Dyn::Truthy(Dyn::Get(cfg, "_path")) ? Dyn::Str(cfg.at("_path")) : std::string("defaults (no .review-gates/config.json)")));
|
||||
for (const Json& w : Dyn::Or(Dyn::Get(cfg, "_warnings"), Dyn::EmptyList())) log(std::format("config: warning: {}", Dyn::Str(w)));
|
||||
// The mode's lenses: the others are another mode's and say nothing
|
||||
// about this run.
|
||||
const std::vector<std::string> modeLenses = Plan::ModeLenses(a.mode);
|
||||
const std::vector<std::string> modeLenses = Plan::KindLenses(a.kind);
|
||||
std::vector<std::string> lensParts;
|
||||
for (const std::string& lf : modeLenses) {
|
||||
const std::string name = Plan::LensName(lf);
|
||||
lensParts.push_back(std::ranges::contains(off, lf) ? std::format("{} OFF (lenses.{}.run = false)", name, name) : std::format("{} ({})", name, Dyn::Str(Dyn::At(environments, lf))));
|
||||
lensParts.push_back(std::ranges::contains(off, lf) ? std::format("{} OFF (not in modes.{}.lenses)", name, a.mode) : std::format("{} ({})", name, Dyn::Str(Dyn::At(environments, lf))));
|
||||
}
|
||||
log(std::format("lenses: {}", Dyn::Join(lensParts, ", ")));
|
||||
std::vector<std::string> running;
|
||||
|
|
@ -534,7 +539,7 @@ namespace Crafter::Review::Run {
|
|||
if (!unknown.empty()) Die(std::format("--units names ids not in the inventory: {}", Dyn::Join(unknown, ", ")));
|
||||
}
|
||||
dispEntries = Dispositions::Load(a.dispositions.value_or(""));
|
||||
dispRows = Dispositions::Classify(dispEntries, hash, a.artifact, a.mode);
|
||||
dispRows = Dispositions::Classify(dispEntries, hash, a.artifact, a.kind);
|
||||
inForce = Dispositions::InForce(dispEntries, dispRows);
|
||||
std::vector<std::string> rowParts;
|
||||
for (const Json& r : dispRows) rowParts.push_back(std::format("{}:{}", Dyn::Str(r.at("id")), Dyn::Str(r.at("status"))));
|
||||
|
|
@ -543,7 +548,7 @@ namespace Crafter::Review::Run {
|
|||
// The references the artifact cites, prefetched into the
|
||||
// gate-state (a dry run reads an existing index and fetches
|
||||
// nothing), and each reviewer's calibration map.
|
||||
const std::string text = a.mode == "reply" ? Dyn::ReadText(fs::path(a.artifact)) : Dyn::Join(lines, "\n");
|
||||
const std::string text = a.kind == "reply" ? Dyn::ReadText(fs::path(a.artifact)) : Dyn::Join(lines, "\n");
|
||||
refUrls = Refs::ParseRefs(text);
|
||||
const fs::path refsDir = gateDir / "refs";
|
||||
const fs::path indexPath = gateDir / std::format("refs-{}.json", h8);
|
||||
|
|
@ -633,10 +638,10 @@ namespace Crafter::Review::Run {
|
|||
charters[lf] = Prompt::Charter(lf);
|
||||
charterSha[lf] = Plan::Sha(charters[lf]);
|
||||
}
|
||||
systemText = Prompt::SystemText(a.mode);
|
||||
systemText = Prompt::SystemText(a.kind);
|
||||
systemPaths.clear();
|
||||
systemByLens.clear();
|
||||
runLayer = Kernel() ? Prompt::RunLayerKernel(a.mode, Dyn::RelPath(a.artifact, repo.string()), a.subsystem.value_or(""), a.base, reviewers, a.date, trees, hash, lines, units, refDigest, contextPaths)
|
||||
runLayer = Kernel() ? Prompt::RunLayerKernel(a.kind, Dyn::RelPath(a.artifact, repo.string()), a.subsystem.value_or(""), a.base, reviewers, a.date, trees, hash, lines, units, refDigest, contextPaths)
|
||||
: Prompt::RunLayer(Dyn::RelPath(a.artifact, repo.string()), a.base, a.date, trees, hash, lines, units, contextPaths, Basename(reviewed), a.subsystem.value_or(""));
|
||||
// The application under test: the login fixture, the TOTP helper.
|
||||
const Json& fcfg = cfg.at("functional");
|
||||
|
|
@ -644,7 +649,7 @@ namespace Crafter::Review::Run {
|
|||
stacks = LoadStacks();
|
||||
const Json first = *stacks->First();
|
||||
appBlock = Prompt::AppBlock(fcfg, loginFixture, Pool::TotpCommand(loginFixture), slotMode);
|
||||
schemas = {{"block", Schema::SchemaJson("block", a.mode)}, {"whole", Schema::SchemaJson("whole", a.mode)}};
|
||||
schemas = {{"block", Schema::SchemaJson("block", a.kind)}, {"whole", Schema::SchemaJson("whole", a.kind)}};
|
||||
// Memory: every pass's tree measured, its peak recorded per repository
|
||||
// and environment; the budget per gate.
|
||||
calibration = std::make_unique<Memory::Calibration>(scratchRoot / "memory.json", reviewed, DefaultCosts());
|
||||
|
|
@ -659,11 +664,12 @@ namespace Crafter::Review::Run {
|
|||
});
|
||||
}
|
||||
// The database URLs stay here: a db pass gets the broker's address and
|
||||
// its stack's token.
|
||||
// its stack's token. Only a lens this mode runs counts: `off` is the
|
||||
// mode's own kind's, as every reader of it reads it.
|
||||
bool anyDb = false;
|
||||
for (auto it = environments.begin(); it != environments.end(); ++it) {
|
||||
const Plan::Environment* e = Plan::FindEnvironment(Dyn::Str(it.value()));
|
||||
anyDb = anyDb || (e && e->db && !std::ranges::contains(off, it.key()));
|
||||
anyDb = anyDb || (e && e->db && std::ranges::contains(modeLenses, it.key()) && !std::ranges::contains(off, it.key()));
|
||||
}
|
||||
if (!a.dryRun && anyDb) {
|
||||
broker = std::make_unique<PgWire::Broker>();
|
||||
|
|
@ -1183,8 +1189,8 @@ namespace Crafter::Review::Run {
|
|||
// ---- reuse --------------------------------------------------------------------------
|
||||
const Plan::CommitCode& Run::RangeCode() {
|
||||
if (!commitCode) {
|
||||
commitCode = Plan::CommitCodeOf(Artifact::PatchTexts(a.artifact), a.mode == "series");
|
||||
if (a.mode == "series" && !a.base.empty()) {
|
||||
commitCode = Plan::CommitCodeOf(Artifact::PatchTexts(a.artifact), a.kind == "series");
|
||||
if (a.kind == "series" && !a.base.empty()) {
|
||||
// A kernel export carries a base-commit line only when it was
|
||||
// cut with --base, and then in the cover letter: the
|
||||
// submission base the run was given is part of every code
|
||||
|
|
@ -1200,7 +1206,7 @@ namespace Crafter::Review::Run {
|
|||
// a part, re-normalised against today's dispositions, with its summary
|
||||
// for the block passes. nullopt: the whole pass runs.
|
||||
const std::string lensFile = Dyn::Str(job.at("lensFile"));
|
||||
if (a.mode != "commits") {
|
||||
if (a.kind != "commits") {
|
||||
// Only the push gates reuse a whole pass; a kernel whole pass
|
||||
// runs on every hash.
|
||||
job["reuseKey"] = nullptr;
|
||||
|
|
@ -1268,7 +1274,7 @@ namespace Crafter::Review::Run {
|
|||
// rule, 2026-10-06.6); every text unit on its text and what it
|
||||
// cites: the [n] URLs, the anchor when it is dated, the R-units
|
||||
// it names.
|
||||
if (a.mode == "series" && Dyn::Get(job, "unitKind") == "code") return Plan::CodeReuseKey(job, lensFile, text, RangeCode(), ids, charterSha.at(lensFile), PromptVersion, env);
|
||||
if (a.kind == "series" && Dyn::Get(job, "unitKind") == "code") return Plan::CodeReuseKey(job, lensFile, text, RangeCode(), ids, charterSha.at(lensFile), PromptVersion, env);
|
||||
return Plan::ReuseKey(job, lensFile, text, Plan::TextDeps(text, units, lines, refUrls, anchorText), ids, charterSha.at(lensFile), PromptVersion);
|
||||
}
|
||||
return Plan::BlockReuseKey(job, lensFile, text, RangeCode(), ids, charterSha.at(lensFile), PromptVersion, env);
|
||||
|
|
@ -1428,12 +1434,12 @@ namespace Crafter::Review::Run {
|
|||
const std::lock_guard guard(shared);
|
||||
if (sched) sched->Abort(reason);
|
||||
};
|
||||
const std::string now = Artifact::ArtifactHash(a.mode, a.artifact);
|
||||
const std::string now = Artifact::ArtifactHash(a.kind, a.artifact);
|
||||
if (now != hash) {
|
||||
abortPool(std::format("artifact changed during the run ({} != {})", now.substr(0, 8), h8));
|
||||
return {{{"label", job.at("label")}, {"status", "error"}, {"reason", "artifact changed during the run - aborted"}}, nullptr};
|
||||
}
|
||||
if (const std::optional<std::string> drift = a.mode == "commits" ? treeDrift() : std::nullopt) {
|
||||
if (const std::optional<std::string> drift = a.kind == "commits" ? treeDrift() : std::nullopt) {
|
||||
abortPool(std::format("evidence drift during the run ({})", *drift));
|
||||
return {{{"label", job.at("label")}, {"status", "error"}, {"reason", std::format("{} - aborted", *drift)}}, nullptr};
|
||||
}
|
||||
|
|
@ -1849,11 +1855,11 @@ namespace Crafter::Review::Run {
|
|||
}
|
||||
reviewers = CommaList(a.reviewers);
|
||||
if (!reviewers.empty() && std::ranges::contains(off, std::string(Plan::PersonaLens))) {
|
||||
Die(std::format("--reviewers names {} but the config turns off the persona lens (lenses.{}.run = false): turn it on, or drop --reviewers", Dyn::Join(reviewers, ", "),
|
||||
Die(std::format("--reviewers names {} but modes.{}.lenses does not list the persona lens ({}): list it, or drop --reviewers", Dyn::Join(reviewers, ", "), a.mode,
|
||||
Plan::LensName(Plan::PersonaLens)));
|
||||
}
|
||||
Gate0();
|
||||
const std::vector<std::string> modeLenses = Plan::ModeLenses(a.mode);
|
||||
const std::vector<std::string> modeLenses = Plan::KindLenses(a.kind);
|
||||
std::vector<std::string> only;
|
||||
if (a.only && !a.only->empty()) {
|
||||
only = CommaList(*a.only);
|
||||
|
|
@ -1872,7 +1878,7 @@ namespace Crafter::Review::Run {
|
|||
if (std::ranges::contains(off, lf)) isOff.push_back(lf);
|
||||
}
|
||||
if (!isOff.empty()) {
|
||||
Die(std::format("--only names {}, which the config turns off (lenses.{}.run = false): the config is the record - edit it for a test run", Dyn::Join(isOff, ", "), Plan::LensName(isOff.front())));
|
||||
Die(std::format("--only names {}, which modes.{}.lenses does not list: the config is the record - edit it for a test run", Dyn::Join(isOff, ", "), a.mode));
|
||||
}
|
||||
}
|
||||
std::vector<std::string> without;
|
||||
|
|
@ -1890,7 +1896,7 @@ namespace Crafter::Review::Run {
|
|||
if (!foreign.empty()) Die(std::format("--without names lens file(s) the {} mode never runs: {}", a.mode, Dyn::Join(foreign, ", ")));
|
||||
log(std::format("without: {} - left out of this run by owner ruling (recorded in the dump's args); the run stays a full run", Dyn::Join(without, ", ")));
|
||||
}
|
||||
const std::vector<Plan::Gate> gates = Plan::GatesFor(a.mode, only, without, off);
|
||||
const std::vector<Plan::Gate> gates = Plan::GatesFor(a.kind, only, without, off);
|
||||
if (gates.empty()) {
|
||||
std::vector<std::string> why;
|
||||
std::vector<std::string> offHere;
|
||||
|
|
@ -1898,7 +1904,7 @@ namespace Crafter::Review::Run {
|
|||
if (std::ranges::contains(modeLenses, lf)) offHere.push_back(lf);
|
||||
}
|
||||
if (offHere.size() == modeLenses.size()) {
|
||||
why.emplace_back("the config turns on no lens (every lens is off until lenses.<name>.run = true turns it on)");
|
||||
why.emplace_back(std::format("modes.{}.lenses lists no lens of this kind (every lens is off until a mode lists it)", a.mode));
|
||||
} else if (!offHere.empty()) {
|
||||
std::vector<std::string> names;
|
||||
for (const std::string& lf : offHere) names.push_back(Plan::LensName(lf));
|
||||
|
|
@ -2008,7 +2014,7 @@ namespace Crafter::Review::Run {
|
|||
owedReads += o.at("reads").get<std::int64_t>();
|
||||
}
|
||||
overall = std::format("CONFIRMING - NOT SEND-READY (gates clean; {} code unit(s) owe {} clean read(s) to reach {}: run the same line again)", owedUnits, owedReads, x);
|
||||
} else if (personaRan || a.mode == "commits") {
|
||||
} else if (personaRan || a.kind == "commits") {
|
||||
// commits: no persona gate - the gates clean = push-ready (the
|
||||
// owner is the last gate).
|
||||
overall = "SEND-READY";
|
||||
|
|
@ -2020,7 +2026,7 @@ namespace Crafter::Review::Run {
|
|||
|
||||
std::int32_t Run::Finish(std::string overall, const Json& stoppedAt, Json incomplete) {
|
||||
if (broker) broker->Close();
|
||||
if (Artifact::ArtifactHash(a.mode, a.artifact) != hash) {
|
||||
if (Artifact::ArtifactHash(a.kind, a.artifact) != hash) {
|
||||
overall = "INCOMPLETE - NOT SEND-READY (artifact changed during the run)";
|
||||
incomplete.push_back({{"gate", "end"}, {"reason", "artifact hash changed during the run"}});
|
||||
}
|
||||
|
|
@ -2121,7 +2127,7 @@ namespace Crafter::Review::Run {
|
|||
const Json& db = Dyn::Get(s, "dbUrl");
|
||||
stackList.push_back({{"id", s.at("id")}, {"appUrl", s.at("appUrl")}, {"dbUrl", Dyn::Truthy(db) ? Json(PgWire::Redact(Dyn::Str(db))) : Json()}, {"login", Dyn::Get(s, "login")}});
|
||||
}
|
||||
const std::vector<std::string> modeLenses = Plan::ModeLenses(a.mode);
|
||||
const std::vector<std::string> modeLenses = Plan::KindLenses(a.kind);
|
||||
Json lensesOff = Json::array();
|
||||
for (const std::string& lf : off) {
|
||||
if (std::ranges::contains(modeLenses, lf)) lensesOff.push_back(Plan::LensName(lf));
|
||||
|
|
@ -2144,6 +2150,7 @@ namespace Crafter::Review::Run {
|
|||
Json dump = {
|
||||
{"driver", DriverLine()},
|
||||
{"mode", a.mode},
|
||||
{"kind", a.kind},
|
||||
{"artifact", Dyn::RelPath(a.artifact, repo.string())},
|
||||
{"hash", hash},
|
||||
{"date", a.date},
|
||||
|
|
@ -2388,7 +2395,7 @@ namespace Crafter::Review::Run {
|
|||
// second store of the same run, or the relaunch of an unfinished run,
|
||||
// adds nothing. The persona pass is recorded once the persona gate
|
||||
// passed.
|
||||
const Json read = a.mode == "reply" ? Json() : Json({{"hash", h8}, {"round", round}, {"run", Basename(dumpPath)}});
|
||||
const Json read = a.kind == "reply" ? Json() : Json({{"hash", h8}, {"round", round}, {"run", Basename(dumpPath)}});
|
||||
const Json persona = personaRan ? Json({{"hash", hash}, {"reviewers", Array(reviewers)}, {"date", a.date}}) : Json();
|
||||
const std::vector<std::string> drops(dirty.begin(), dirty.end());
|
||||
Json merged = State::SaveState(statePath, sets, drops, read, persona);
|
||||
|
|
|
|||
Loading…
Reference in a new issue