Skip to content

Commit bd689f8

Browse files
committed
Improve dashboard diagnostics and CI hardening
1 parent d0a3016 commit bd689f8

4 files changed

Lines changed: 59 additions & 13 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
if: github.event_name != 'push'
3232
steps:
3333
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34-
- uses: actions/setup-node@v6
34+
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
3535
with:
3636
node-version: "24"
3737
- name: Build
@@ -43,7 +43,7 @@ jobs:
4343
if: github.event_name == 'push'
4444
steps:
4545
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46-
- uses: actions/setup-node@v6
46+
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
4747
with:
4848
node-version: "24"
4949
- name: Publish

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ POST /v1/package-harness/jobs/{jobId}/complete
7777

7878
Every request carries `Authorization: Bearer <PACKAGE_HARNESS_WORKER_TOKEN>`, `Content-Type: application/json`, and `User-Agent: dappnode-package-harness/<version>`. Protocol DTOs and their golden fixtures live under [`src/coordinator`](src/coordinator) and [`tests/fixtures`](tests/fixtures).
7979

80+
Claim input is validated before persistence or execution: `runId` is a bounded safe identifier, `source.repository` is an ASCII `owner/repository` name, `source.headSha` is a 7–64 character hexadecimal commit ID, and package names and references use the shared Dappnode parsers.
81+
8082
Before mutating, the worker atomically persists the full claim and opaque claim token under `DATA_DIR`. It persists every recovery-relevant phase and, before network delivery, the exact serialized completion JSON. Transient failures and coordinator compatibility rejections retry the same bytes with capped backoff and worker-specific jitter, so a coordinator upgrade heals delivery without a worker restart. Successful delivery clears legacy delivery-recovery markers. The worker never claims another job until completion is acknowledged as `recorded` or `duplicate`.
8183

8284
On restart, a pending completion is retried first. An interrupted job is never rerun: if it may have mutated the target, the worker inspects Dappmanager, performs bounded cleanup, then sends an `interrupted` worker-error completion. A lost claim is released locally after cleanup succeeds; if Tropibot still holds unresolved coordinator state, the next claim receives a conflict and polling stops without inventing new local recovery work. Manual recovery is reserved for failed cleanup, ambiguous local records, or a conflicting completion that proves Tropibot already holds different state for the claim.

‎src/api/dashboard/dashboard.css‎

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ h2 {
544544
var(--panel);
545545
}
546546

547-
.job summary {
547+
.job > summary {
548548
display: grid;
549549
grid-template-columns: minmax(260px, 1.8fr) minmax(140px, 0.75fr) minmax(150px, 0.8fr) 132px 26px;
550550
gap: 22px;
@@ -555,7 +555,7 @@ h2 {
555555
list-style: none;
556556
}
557557

558-
.job summary::-webkit-details-marker {
558+
.job > summary::-webkit-details-marker {
559559
display: none;
560560
}
561561

@@ -782,23 +782,66 @@ h2 {
782782

783783
.diagnostic-card {
784784
min-width: 0;
785-
padding: 18px;
786785
background: rgba(17, 16, 15, 0.97);
787786
}
788787

789788
.diagnostic-card.diagnostic-wide {
790789
grid-column: 1 / -1;
791790
}
792791

793-
.diagnostic-card h4,
792+
.diagnostic-card > summary,
794793
.diagnostic-card h5 {
795-
margin: 0 0 14px;
796794
font-size: 12px;
797795
font-weight: 700;
798796
}
799797

798+
.diagnostic-card > summary {
799+
display: flex;
800+
gap: 12px;
801+
align-items: center;
802+
justify-content: space-between;
803+
padding: 18px;
804+
cursor: pointer;
805+
list-style: none;
806+
user-select: none;
807+
}
808+
809+
.diagnostic-card > summary::-webkit-details-marker {
810+
display: none;
811+
}
812+
813+
.diagnostic-card > summary::after {
814+
color: var(--subtle);
815+
content: "+";
816+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
817+
font-size: 14px;
818+
font-weight: 500;
819+
}
820+
821+
.diagnostic-card[open] > summary {
822+
border-bottom: 1px solid var(--line);
823+
}
824+
825+
.diagnostic-card[open] > summary::after {
826+
content: "−";
827+
}
828+
829+
.diagnostic-card > :not(summary) {
830+
margin-right: 18px;
831+
margin-left: 18px;
832+
}
833+
834+
.diagnostic-card > summary + * {
835+
margin-top: 18px;
836+
}
837+
838+
.diagnostic-card > :last-child:not(summary) {
839+
margin-bottom: 18px;
840+
}
841+
800842
.diagnostic-card h5 {
801843
margin-top: 20px;
844+
margin-bottom: 14px;
802845
color: var(--muted);
803846
font-size: 10px;
804847
letter-spacing: 0.08em;
@@ -1010,7 +1053,7 @@ h2 {
10101053
border-bottom: 1px solid var(--line);
10111054
}
10121055

1013-
.job summary {
1056+
.job > summary {
10141057
grid-template-columns: minmax(220px, 1.6fr) minmax(125px, 0.8fr) 120px 24px;
10151058
}
10161059

@@ -1111,7 +1154,7 @@ h2 {
11111154
flex: 0 0 auto;
11121155
}
11131156

1114-
.job summary {
1157+
.job > summary {
11151158
grid-template-columns: minmax(0, 1fr) auto 20px;
11161159
gap: 12px;
11171160
min-height: 76px;

‎src/api/dashboard/dashboard.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,10 @@ function diagnosticTable(headers, rows) {
195195
return wrapper;
196196
}
197197

198-
function diagnosticSection(title, className = "") {
199-
const section = node("section", `diagnostic-card ${className}`.trim());
200-
section.append(node("h4", null, title));
198+
function diagnosticSection(title, className = "", open = true) {
199+
const section = node("details", `diagnostic-card ${className}`.trim());
200+
section.open = open;
201+
section.append(node("summary", null, title));
201202
return section;
202203
}
203204

@@ -318,7 +319,7 @@ function renderCaptureDiagnostics(label, capture) {
318319
}
319320

320321
function renderInventory(job) {
321-
const section = diagnosticSection("Package inventory", "diagnostic-wide");
322+
const section = diagnosticSection("Package inventory", "diagnostic-wide", false);
322323
const rows = [];
323324
job.diagnostics.initialPackages.forEach((pkg) =>
324325
rows.push(["Before", pkg.dnpName, pkg.version, pkg.isCore ? "yes" : "no"]),

0 commit comments

Comments
 (0)