You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d34ab57
Browse filesBrowse the repository at this point in the historyBrowse files
fix(admin): console and panel sentences follow the venue a run used (#712)
Part 1 of #712. Every sentence the console and the /dispatch panel print
about a run's venue is now derived from the worker's own tables, so none is
wrong for local, podman, openshell or openshell-bind.
- BACKENDS_TABLE gains serves: { liveTranscript, steering, recovery,
sandboxShell }, each yes, no or image. A test holds it to the real
sources: each bundle's binds and transcript mode, SANDBOX_LAUNCHERS,
and every venue's preflight with and without recover.
- The record gains liveSkipped (LIVE_SKIPPED_REASONS). It was only logged
before.
- Admin sentence tables (STEER_SKIPPED_TEXT, LIVE_SKIPPED_TEXT, SERVES_TEXT,
CUSTODY_TEXT) are bolted to the worker enums.
- The console prints the sandbox command only for a venue with a sandbox
shell. Otherwise it gives the panel's own reason.
- The secrets disclosure follows the custody of the trigger's venue: on
openshell, placeholders in the agent, not values.
- The live and progress "absent" sentences give the record's liveSkipped,
else the venue or image cause.
- The panel offers its steer keys only when the run's inbox is open, and
both run views show steerSkipped as a sentence.
- The setup wizard gates an openshell-only deployment on its gateway's
engine, then on the openshell CLI and gateway, and offers or refuses
the venue by name.
- PI_SECRET_PROFILES env profiles are listed beside the overlay's. Adding
a profile refuses, before the confirm, a name the env already declares
and a resolver whose real path is outside the roots as written (the
worker's own rule). A path this host cannot resolve gets a note.
- run.recover with an explicit venue that cannot recover is refused at
load and at write. Admin also judges the implicit venue against
PI_BACKENDS[0].
- The comments claiming profile management lives "nowhere else" are
corrected.
Specs: DES-CONTAINER-BACKEND-REGISTRY, DES-OPERATOR-CONSOLE,
DES-ADMIN-VIA-PI-EXTENSION, DES-FIRST-RUN-SETUP-WIZARD, DES-OPENSHELL-VENUE,
INT-RUN-HISTORY-FILE-CONTRACT, INT-TRIGGERS-FILE-CONTRACT,
REQ-OPERATOR-CONSOLE-SCREENS, REQ-DEPLOYMENT-BOOTSTRAP and REQ-RUN-RECOVERY
are amended.
Signed-off-by: Rob Boerman <robboerman@live.nl>
if(body===null&&names===null)returntitled(title,html`<pclass="note">This run's record holds no progress (an older worker, or PI_RUN_PROGRESS=0).</p>`);
574
+
// Issue #712: a record that names its live skip says it; one on a venue that does not always stream adds that cause.
575
+
if(body===null&&names===null){
576
+
constcause=liveAbsentCause(record);
577
+
constwhy=cause?.skipped ? `it had no live transcript to read it from: ${cause.skipped}` : cause?.venue ? `an older worker, PI_RUN_PROGRESS=0, ${VENUE_MAY_NOT_STREAM}` : "an older worker, or PI_RUN_PROGRESS=0";
578
+
returntitled(title,html`<pclass="note">This run's record holds no progress (${why}).</p>`);
579
+
}
570
580
returntitled(title,html`${body??html`<pclass="note">This run's record holds no progress.</p>`}${names}`);
returnhtml`<h3>Actions</h3><p>Open its retained workspace on the host: <codeclass="mono">${`pi-dispatch sandbox ${r.jobId}`}</code></p>${canAct(view) ? actForm("rerun",{hidden: [["jobId",r.jobId]],label: "Preview a re-run"}) : null}`;
762
+
// Issue #712: the command only for a venue with a sandbox shell (`serves.sandboxShell`, held to the worker's
763
+
// SANDBOX_LAUNCHERS), and otherwise the reason the panel's sandbox pane gives, in its words (`sandboxShellRefusal`). A
764
+
// record with no `backend` is a `local` run from before attribution (`UNATTRIBUTED_BACKEND`), as the sandbox reads it.
constreopen=refused===null ? html`<p>Open its retained workspace on the host: <codeclass="mono">${`pi-dispatch sandbox ${r.jobId}`}</code></p>` : html`<pclass="note">Its workspace is ${refused}.</p>`;
768
+
returnhtml`<h3>Actions</h3>${reopen}${canAct(view) ? actForm("rerun",{hidden: [["jobId",r.jobId]],label: "Preview a re-run"}) : null}`;
769
+
}
770
+
771
+
/**
772
+
* The run summary's skip rows (issue #712): "Steering" (why a steer-armed run took no message, the record's
773
+
* `steerSkipped`) and "Live transcript" (why it had none, `liveSkipped`), each the closed enum and its sentence; no row
774
+
* for a record that carries neither, so every other run renders byte-identical.
if(names.length===0)returnhtml`<pclass="note">No secret profile is declared.</p>${profilesEditor(view)}`;
1377
-
returnhtml`<pclass="note">Names only: a profile's resolver and its references stay in the settings file.</p><ulclass="plain">${names.map((n)=>html`<liclass="mono">${n}</li>`)}</ul>${profilesEditor(view)}`;
1406
+
// Issue #712: the PI_SECRET_PROFILES names too (the snapshot's `secretProfilesEnv`), since the worker merges both; a
1407
+
// name in both is the worker's ambiguity, which refuses every secrets job, and is marked so.
constenvNote=env?.malformed ? html`<pclass="warn">PI_SECRET_PROFILES does not parse, so the worker refuses to boot until it is fixed.</p>` : null;
1411
+
// "None" only where the console can see both sources; otherwise it names the one it read.
1412
+
if(names.length===0&&fromEnv.length===0)returnhtml`<pclass="note">No secret profile is declared${env?.seen===true ? "" : " in the settings overlay"}.</p>${envNote}${profilesEditor(view)}`;
1413
+
constoverlayItem=(n)=>(fromEnv.includes(n) ? html`<liclass="mono warn">${n} (AMBIGUOUS: also in PI_SECRET_PROFILES, so the worker refuses every secrets job)</li>` : html`<liclass="mono">${n}</li>`);
1414
+
returnhtml`<pclass="note">Names only: a profile's resolver and its references stay in the settings file${fromEnv.length>0 ? " or the .env" : ""}.</p><ulclass="plain">${fromEnv.map((n)=>html`<liclass="mono">${n} (PI_SECRET_PROFILES)</li>`)}${names.map(overlayItem)}</ul>${envNote}${profilesEditor(view)}`;
1378
1415
});
1379
1416
1380
1417
/** The bundle resolvers editor (issue #704): a name, its resolver's absolute path and the format it prints. */
* The run page's "Live transcript" section (operator only), from the page data's `transcript` (the fleet reader's
@@ -118,7 +123,7 @@ export function runTranscriptSection(view) {
118
123
if(typeofid!=="string"||id==="")returntitle;
119
124
constmeta=view?.data?.transcript??null;
120
125
if(meta?.unreachable)returnhtml`${title}<pclass="warn">The live transcript could not be read (is Valkey reachable?). Reload to try again.</p>`;
121
-
if(meta?.exists!==true)returnhtml`${title}<pclass="note">${TRANSCRIPT_ABSENT} Reload to check again.</p>`;
126
+
if(meta?.exists!==true)returnhtml`${title}<pclass="note">${transcriptAbsentText(view?.data?.run?.record??null)} Reload to check again.</p>`;
122
127
constnote=html`<pclass="note">${meta.ended ? `The run has ended (${meta.outcome??"unknown"}); its stream is kept 24 hours.` : "The run is publishing its transcript."}</p>`;
0 commit comments