@stage5/lumine 0.3.52 → 0.3.53
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/lib/build-review.js +16 -2
- package/package.json +1 -1
- package/sdk/LUMINE_ADMIN.md +1 -1
package/lib/build-review.js
CHANGED
|
@@ -761,8 +761,21 @@ async function runChromeReview({
|
|
|
761
761
|
});
|
|
762
762
|
const closed = new Promise((resolve, reject) => {
|
|
763
763
|
child.once("error", reject);
|
|
764
|
-
child.once("
|
|
765
|
-
|
|
764
|
+
child.once("exit", (code, signal) => {
|
|
765
|
+
// Chrome's crash reporter can inherit stderr and outlive Chrome. Node's
|
|
766
|
+
// `close` then never fires even though the browser already exited.
|
|
767
|
+
// Drain the last output briefly, then close only our pipe endpoints;
|
|
768
|
+
// do not kill another process or turn an early browser exit into success.
|
|
769
|
+
let done = false;
|
|
770
|
+
const finish = (stdioDrainTimedOut) => {
|
|
771
|
+
if (done) return;
|
|
772
|
+
done = true;
|
|
773
|
+
clearTimeout(drainTimer);
|
|
774
|
+
for (const stream of child.stdio) stream?.destroy?.();
|
|
775
|
+
resolve({ code: Number(code ?? -1), signal: signal || null, stdioDrainTimedOut });
|
|
776
|
+
};
|
|
777
|
+
const drainTimer = setTimeout(() => finish(true), 250);
|
|
778
|
+
child.once("close", () => finish(false));
|
|
766
779
|
});
|
|
767
780
|
});
|
|
768
781
|
// The hard kill covers the observation window plus, when a script runs,
|
|
@@ -1140,6 +1153,7 @@ export async function runManagedBuildReview({ options, authToken, buildId }) {
|
|
|
1140
1153
|
closeRequested: browser.closeRequested === true,
|
|
1141
1154
|
forcedTermination: browser.forcedTermination === true,
|
|
1142
1155
|
exitedCleanly: browser.code === 0 && !browser.signal,
|
|
1156
|
+
stdioDrainTimedOut: browser.stdioDrainTimedOut === true,
|
|
1143
1157
|
evidenceCompleteBeforeClose: browser.evidenceCompleteBeforeClose === true,
|
|
1144
1158
|
exitedBeforeClose: browser.exitedBeforeClose === true,
|
|
1145
1159
|
closeDurationMs: Number.isFinite(browser.closeDurationMs)
|
package/package.json
CHANGED
package/sdk/LUMINE_ADMIN.md
CHANGED
|
@@ -1184,7 +1184,7 @@ lumine admin report serve --file <dir>/daily-management-report.md [--port <n>] [
|
|
|
1184
1184
|
```
|
|
1185
1185
|
|
|
1186
1186
|
These compose the documented commands in this contract, running them as child processes, so every scope check, audit and pagination rule applies unchanged.
|
|
1187
|
-
- **`gather`** saves
|
|
1187
|
+
- **`gather`** saves its fixed set of read-only reports into `<dir>`, including the canonical published Math Lab queue in `math-lab-queue.json`. It is not the complete daily checklist: app refills/usage, all-type Build reviews, sponsor integrity and other duties need their own steps. Repository agents follow the current full-run coverage index in `agent-guides/lumine-admin.md`. It follows `bot-output` to exhaustion and renders `bot-chats.txt`, then lists any failed step in `gather.json`. Total/per-step `durationMs`, attempts and recovered reads make recurring slow or failing collection steps visible during the daily review. It also creates `review-state.json`: every source is fetched, not read. Children bypass update checks, require matching fresh stdout/file receipts, and retry an unconfirmed opted-in read at most once. Mutations never auto-retry. It needs the active run for run-scoped reads.
|
|
1188
1188
|
- **`progress`** reads local review state and explicit operator acknowledgments, writes private `progress.json`, and keeps reading, canonical effort mutations, the run lease, and browser checks separate. Add all required duties for the actual run scope and its carryovers; collection alone is not a full review. A completed run lease cannot complete a pending duty. Reading acknowledgments bind to the current file bytes and are operator attestations, not proof of comprehension.
|
|
1189
1189
|
- **`featured candidates`** returns Subjects posted after the Bangkok-midnight cutoff that are off the board and provably never Featured. Each one comes with its human/bot comment counts, explicit comment truncation/completeness, and whether Mikey has viewed it. Counts from truncated context are partial. An unavailable Subject context fails the collection. Eligibility only: ranking stays editorial.
|
|
1190
1190
|
- **`report serve`** detaches a loopback server that answers only `/`, `marked.min.js` and the report Markdown. `--open` opens Chrome and reports whether the OS accepted the request. Render, navigation and original-source verification remain pending until actually checked. Startup failures stop only the child this command started.
|