gitea: a start ends the token files an earlier build kept, revoked at the forge, never read

G2 token-stand-in-goes (TypeScript half): at each start while a token file remains and once
this start's token is held, the forge's token lists are read before any token is deleted, a pair
is matched by the token's last eight characters and its scopes, revoked by its id and deleted;
a .tmp goes with its pair, a cut one unrevoked; a pair that stays is the finding
token-file-unrevoked. findingKey and findingValue move to findings.ts.

Builds: design 47 H2 H-A-575, H-A-602, H-A-642, H-A-699
This commit is contained in:
2026-11-25 17:10:33 +01:00
parent c1abd7e210
commit 5a82d93ccb
6 changed files with 324 additions and 25 deletions
+1 -14
View File
@@ -127,20 +127,7 @@ export class CatalogView {
/** The kind of a finding of a first view unanswered past its bound (ADR 0615 §6), as mesh-sdk's Go views writes it. */
export const UNANSWERED_KIND = "first-view-unanswered";
/** The key of a finding about a module: scope, the id's dotted parts, and the kind, each part made safe (mesh-sdk health.Key). */
export function findingKey(scope: string, id: string, kind: string): string {
return [scope, ...id.split("."), kind].map((p) => p.trim().replace(/[^A-Za-z0-9_=/-]/g, "_") || "_").join(".");
}
/** A finding as the condition keeper reads it from the module's state `findings`: its key and its value. */
export function findingValue(f: Finding): { key: string; value: Record<string, unknown> } {
const key = findingKey("module", f.id, f.kind);
return { key, value: {
v: 1, key, kind: f.kind, subject: { scope: "module", id: f.id }, severity: "warning", summary: f.summary, headline: f.headline,
explanation: f.explanation, resolved: "", evidence: [{ at: f.at, said: f.summary }], source: `${f.observer}.${f.kind}`,
observer: f.observer, at: f.at,
} };
}
export { findingKey, findingValue } from "./findings.js";
/** A part's finding of a first view unanswered past its bound, from the follower's status. */
export function unansweredFinding(part: string, s: Status, at: Date): Finding {