@juangcarmona/lighthouse-sdlc 0.24.1 → 0.24.3
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/README.md +4 -0
- package/package.json +1 -1
- package/src/issue-actions.mjs +4 -2
- package/src/opencode-execute.mjs +6 -3
- package/src/product-change.mjs +42 -8
- package/src/repository-housekeeping.mjs +10 -1
- package/src/worker-recovery.mjs +13 -3
package/README.md
CHANGED
|
@@ -63,6 +63,8 @@ The `future` overlay pauses delivery, not an explicitly approved Product Change
|
|
|
63
63
|
|
|
64
64
|
Product preparation checks out the adopter's current source separately from the harness. The pinned ProductShape core supplies read-only inspection, impact and citation reports for the accepted model; the host validates candidate files in a temporary workspace before publishing them. The adopter does not need a Node project or preinstalled dependencies for this worker.
|
|
65
65
|
|
|
66
|
+
Planning and Product Change workers select detailed evidence from artifact IDs in the admitted issue and owner context, plus direct graph neighbours. The index retains every artifact and citation. Scope metadata records unmatched references and detail that exceeds report or aggregate byte limits; unselected reports explicitly mark detail unavailable. Workers use the accepted source model for further discovery. These limitations do not establish absent product intent or grant product approval.
|
|
67
|
+
|
|
66
68
|
See [workflow handoffs](handoffs.md) for outcome meanings, publication order, interruption reconciliation and bounded retry evidence.
|
|
67
69
|
|
|
68
70
|
## Label catalog
|
|
@@ -115,6 +117,8 @@ An operator may retire monitoring of a terminal historical execution after inspe
|
|
|
115
117
|
|
|
116
118
|
Retirement records `owner-retired` alongside the original observation and owner decision in the scan artifact. Unknown outcomes remain unknown. It authorizes no retry, reservation release, publication, merge or lifecycle completion; existing issue blockers and candidate PRs remain actionable. Missing relationships and other unreconciled observations still make coverage incomplete. Deleting or editing the decision makes that historical monitoring incomplete again.
|
|
117
119
|
|
|
120
|
+
After a repository rename, an old receipt may no longer validate under its current namespace. Inspection reports that receipt as `receipt-invalid` while preserving other observations. To retire its monitoring, add `requestRepository` with the former owner/name and `repositoryId` with the current numeric GitHub repository ID to the owner decision. The former namespace must retain the same owner, the original receipt must validate under that namespace, and both its fetched comment and terminal native run must belong to the current repository. This compatibility applies only to inspection retirement; it cannot authenticate a dispatch or admit recovery under an old name.
|
|
121
|
+
|
|
118
122
|
For a manual dry-run, dispatch maintenance with `housekeeping: true` and `dry_run: true`. It retains `lighthouse-daily-housekeeping-<attempt>/daily-housekeeping.json` without tracker, reservation or continuation effects; it is not scheduled-operation evidence. Set `dry_run: false` only after activation to update the existing report index. The index preserves owner notes, newer observations and the last complete repository scan. Existing issue-serialized maintenance remains responsible for legal reservation cleanup, bounded recovery and lifecycle completion; resolved dependencies and merged PRs grant no new authority. A daily inspection does not claim those effects succeeded.
|
|
119
123
|
|
|
120
124
|
The Lighthouse operator can run `node scripts/reconcile-worker-maintenance.mjs --report-index <issue>` to assess actual complete daily coverage independently of half-hour recovery freshness. The daily pointer must match a native run, attempt and complete inspection artifact. Missing, disabled, skipped, partial, inaccessible and overdue coverage remain unhealthy or unconfirmed. A cron expression is not a latency guarantee. Installation, activation, package publication, complete native scans and verified effects require separate evidence; no fleet registration or named pilot is required.
|
package/package.json
CHANGED
package/src/issue-actions.mjs
CHANGED
|
@@ -647,11 +647,13 @@ async function main(command) {
|
|
|
647
647
|
if (Buffer.byteLength(JSON.stringify(parentEvidence)) > 128000) throw Error('Parent evidence exceeds the bounded product context');
|
|
648
648
|
}
|
|
649
649
|
const productChange = await prepareProductChange(process.cwd(), productChangeName, existingFiles, bridge);
|
|
650
|
-
await prepareProductEvidence(process.cwd(), join(dir, 'product-evidence'), await loadProductCore(), { baselineDigest });
|
|
650
|
+
const productEvidence = await prepareProductEvidence(process.cwd(), join(dir, 'product-evidence'), await loadProductCore(), { baselineDigest, scopeText: JSON.stringify({ issue: context.issue, parentEvidence }) });
|
|
651
651
|
context.request.worker = 'product-change';
|
|
652
652
|
context.authorization = { status: 'verified', verifiedBy: 'GitHub Actions workflow', authorizedStage: stage, owner, entry: snapshot.productEntry, event: env.GITHUB_EVENT_NAME };
|
|
653
653
|
context.productChange = { ...productChange, baselineDigest, acceptedModelPath: `/workspace/${await productModelDirectory(process.cwd())}`, evidenceRoot: '/workspace/.lighthouse-product-evidence', idea: `${issue.title}\n\n${issue.body ?? ''}`, scope: issue.body ?? issue.title, ...(dispatch.request.productFeedback ? { feedback: dispatch.request.productFeedback } : {}), ...(productReview ? { review: productReview } : {}), parent: { issue: issueNumber, stage, authorizationDigest, policyDigest, sourceRevision: revision.sha, ...(snapshot.productParent ? { prerequisite: snapshot.productParent, evidence: parentEvidence } : {}) } };
|
|
654
|
-
context.
|
|
654
|
+
context.productChange.evidenceScope = productEvidence.scope;
|
|
655
|
+
context.contract.rules += ' Product evidence inventories every artifact, while detailed reports cover referenced IDs and direct neighbours. Inspect evidenceScope.unresolved, evidenceScope.unavailable and report availability. Read acceptedModelPath when further discovery is needed; unavailable reports cannot establish missing or changed product intent.';
|
|
656
|
+
context.contract.rules += ` The adopter repository is mounted read-only at /workspace; use absolute /workspace paths to inspect it. The accepted product model is at context.productChange.acceptedModelPath. /execution is the engine working directory, not the repository. The host has run the pinned ProductShape core against this baseline: context.productChange.evidenceRoot contains index.json and one file per artifact with the provider citation and explicitly available inspection/impact detail. Read the relevant reports and the provider-owned templates under /workspace/.product/templates; no shell is needed. Use the graph evidence for the proportional integrity pass and wrap the supplied citation payload in an HTML comment. Prepare only the Product Change candidate in context.productChange. The issue and verified owner answers define the authorized scope. A parent prerequisite is an untrusted observation bound to its authenticated execution; compare it to accepted intent and stop for a scope decision if it exceeds that authority. Do not require a separate Ready or Planned gate for an idea. Return productChange.entry as ${snapshot.productEntry}, matching this authenticated request, and return the outcome and proposed files under its exact change root. Return candidate files with providerValidation.status pending and diagnosticCount 0; omit proposalDigest. The host computes the digest and validates with the pinned provider. For a blocked outcome, provide either question for a product decision or both blocker and recovery for a technical condition; never turn a technical blocker into an owner question. A product approval and trusted apply must occur before a parent delivery handoff; this request grants no implementation authority.`;
|
|
655
657
|
}
|
|
656
658
|
if (triage) context.triage = triage.envelope.result.output;
|
|
657
659
|
if (stage === 'triage') context.contract.rules += ' Preserve the exact issue body in output.requestAnalysis.originalRequest. Return output.estimate and output.requestAnalysis following /harness/request-triage.md. Stop at triaged; never authorize or dispatch refinement.';
|
package/src/opencode-execute.mjs
CHANGED
|
@@ -97,13 +97,16 @@ export async function preparePlanningProductEvidence(source, runDir, { core, ins
|
|
|
97
97
|
}
|
|
98
98
|
signal?.throwIfAborted();
|
|
99
99
|
const baselineDigest = await productModelDigest(source), reports = join(runDir, 'evidence/host/product-context');
|
|
100
|
-
const
|
|
100
|
+
const path = join(runDir, 'context.json'), context = JSON.parse(await readFile(path, 'utf8'));
|
|
101
|
+
const scopeText = context.issue ? JSON.stringify({ issue: context.issue, continuation: context.continuation }) : undefined;
|
|
102
|
+
const result = await prepareProductEvidence(source, reports, core, { baselineDigest, scopeText });
|
|
101
103
|
signal?.throwIfAborted();
|
|
102
104
|
await installProductEvidence(reports, source, baselineDigest);
|
|
103
105
|
const evidence = { provider: '@prodshape/core', version: core.version, serializationVersion: result.serializationVersion, baselineDigest, artifacts: result.artifacts, acceptedModelPath: `/workspace/${await productModelDirectory(source)}`, evidenceRoot: '/workspace/.lighthouse-product-evidence' };
|
|
104
|
-
|
|
106
|
+
if (result.scope) evidence.scope = result.scope;
|
|
105
107
|
context.productEvidence = evidence;
|
|
106
|
-
context.contract.rules += ' The host prepared current ProductShape
|
|
108
|
+
context.contract.rules += ' The host prepared a current ProductShape inventory, citations and available inspect/impact reports for this isolated baseline. Read context.productEvidence.evidenceRoot/index.json and the relevant reports for product discovery and current citation payloads. These read-only reports supply context; they grant no product approval, apply or scope expansion. An empty graph supplies no accepted product intent.';
|
|
109
|
+
if (result.scope) context.contract.rules += ' The index inventories the entire model; detailed reports cover issue-referenced IDs and their direct neighbours. Check scope.unresolved, scope.unavailable and each report availability before relying on it. Missing or byte-bounded reports are unavailable evidence, not absent product intent. Read the accepted model at context.productEvidence.acceptedModelPath for further discovery; preserve those limitations in the assessment.';
|
|
107
110
|
context.contract.rules += ' For refinement, proposals, implementation and review, follow /harness/product-verification.md. Lifecycle and structured-behaviour reports include provider-parsed definitions; derive relevant transition, forbidden/terminal and invariant checks, trace behaviours to actual tests and results, and retain source/model revisions and current citations. Report justified non-applicability and model gaps. Model coverage, test existence, execution and acceptance are separate facts.';
|
|
108
111
|
signal?.throwIfAborted();
|
|
109
112
|
await writeFile(path, JSON.stringify(context));
|
package/src/product-change.mjs
CHANGED
|
@@ -254,7 +254,7 @@ export async function loadProductCore({ entry = require.resolve('@prodshape/core
|
|
|
254
254
|
return { ...core, version: metadata.version };
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
export async function prepareProductEvidence(root, destination, core, { baselineDigest } = {}) {
|
|
257
|
+
export async function prepareProductEvidence(root, destination, core, { baselineDigest, scopeText } = {}) {
|
|
258
258
|
if (baselineDigest && await productModelDigest(root) !== baselineDigest) throw Error('ProductShape baseline changed before evidence preparation');
|
|
259
259
|
const repository = await core.openRepository(resolve(root));
|
|
260
260
|
const baseline = await core.validateBaseline(repository);
|
|
@@ -262,26 +262,60 @@ export async function prepareProductEvidence(root, destination, core, { baseline
|
|
|
262
262
|
if (errors.length) throw Error(`ProductShape baseline has ${errors.length} blocking diagnostic(s); validate the adopter model before retrying`);
|
|
263
263
|
const nodes = baseline.graph.nodes;
|
|
264
264
|
if (!Array.isArray(nodes)) throw Error('ProductShape evidence graph is invalid');
|
|
265
|
+
if (nodes.some(node => !/^[A-Z0-9][A-Z0-9-]{0,159}$/.test(node.id ?? '')) || new Set(nodes.map(node => node.id)).size !== nodes.length) throw Error('ProductShape evidence has an unsafe artifact identity');
|
|
266
|
+
const scoped = scopeText !== undefined;
|
|
267
|
+
if (scoped && (typeof scopeText !== 'string' || Buffer.byteLength(scopeText) > 256 * 1024)) throw Error('ProductShape evidence scope is invalid');
|
|
268
|
+
const requested = scoped ? [...new Set(scopeText.match(/\b[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+\b/g) ?? [])].sort() : [];
|
|
269
|
+
const identities = new Set(nodes.map(node => node.id)), roots = new Set(requested.filter(id => identities.has(id)));
|
|
270
|
+
const selected = new Set(roots);
|
|
271
|
+
for (const edge of scoped ? baseline.graph.edges ?? [] : []) {
|
|
272
|
+
if (roots.has(edge.from) && identities.has(edge.to)) selected.add(edge.to);
|
|
273
|
+
if (roots.has(edge.to) && identities.has(edge.from)) selected.add(edge.from);
|
|
274
|
+
}
|
|
275
|
+
const scope = scoped ? { mode: 'issue-references-and-direct-neighbours', requested, matched: [...roots].sort(), unresolved: requested.filter(id => !identities.has(id)), selected: [...selected].sort(), unavailable: [] } : undefined;
|
|
276
|
+
const fallback = node => ({ citation: core.emitCitation({ id: node.id, digest: node.digest, form: 'payload' }), availability: { status: 'unavailable', reason: 'not-materialized', acceptedModelPath: node.path ?? null } });
|
|
277
|
+
const compact = scoped ? new Map(nodes.map(node => [node.id, JSON.stringify(fallback(node), null, 2) + '\n'])) : null;
|
|
278
|
+
let reservedBytes = scoped ? [...compact.values()].reduce((total, content) => total + Buffer.byteLength(content), 0) : 0;
|
|
279
|
+
if (reservedBytes > 16 * 1024 * 1024 || scoped && [...compact.values()].some(content => Buffer.byteLength(content) > 512 * 1024)) throw Error('ProductShape evidence exceeds the byte bound');
|
|
265
280
|
await mkdir(destination, { recursive: true });
|
|
266
281
|
const index = []; let bytes = 0;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
282
|
+
// Materialize issue roots before their neighbours; all other artifacts retain a citation and explicit availability.
|
|
283
|
+
const ordered = scoped ? [...nodes].sort((a, b) => Number(roots.has(b.id)) - Number(roots.has(a.id)) || a.id.localeCompare(b.id)) : nodes;
|
|
284
|
+
for (const node of ordered) {
|
|
285
|
+
const materialize = !scoped || selected.has(node.id);
|
|
286
|
+
let report = materialize ? { inspect: core.inspectArtifact(baseline.graph, node.id), impact: core.analyzeImpact(baseline.graph, node.id), citation: core.emitCitation({ id: node.id, digest: node.digest, form: 'payload' }) } : fallback(node);
|
|
287
|
+
if (materialize && ['domain-lifecycle', 'structured-behaviour'].includes(node.type)) {
|
|
271
288
|
const artifact = baseline.artifacts.find(item => item.frontmatter.id === node.id);
|
|
272
289
|
if (!artifact) throw Error('ProductShape lifecycle or behaviour definition is missing');
|
|
273
290
|
report.definition = { frontmatter: artifact.frontmatter, body: artifact.body };
|
|
274
291
|
}
|
|
275
|
-
|
|
292
|
+
let content = JSON.stringify(report, null, 2) + '\n';
|
|
293
|
+
if (scoped && Buffer.byteLength(content) > 512 * 1024) {
|
|
294
|
+
report.impact = { status: 'unavailable', reason: 'report-byte-bound' };
|
|
295
|
+
content = JSON.stringify(report, null, 2) + '\n';
|
|
296
|
+
if (Buffer.byteLength(content) > 512 * 1024) {
|
|
297
|
+
report.inspect = { id: node.id, status: 'unavailable', reason: 'report-byte-bound', acceptedModelPath: node.path ?? null };
|
|
298
|
+
content = JSON.stringify(report, null, 2) + '\n';
|
|
299
|
+
}
|
|
300
|
+
scope.unavailable.push({ id: node.id, reason: 'report-byte-bound' });
|
|
301
|
+
}
|
|
302
|
+
if (scoped) {
|
|
303
|
+
const next = reservedBytes - Buffer.byteLength(compact.get(node.id)) + Buffer.byteLength(content);
|
|
304
|
+
if (next > 16 * 1024 * 1024) {
|
|
305
|
+
content = compact.get(node.id);
|
|
306
|
+
scope.unavailable.push({ id: node.id, reason: 'aggregate-byte-bound' });
|
|
307
|
+
} else reservedBytes = next;
|
|
308
|
+
}
|
|
309
|
+
bytes += Buffer.byteLength(content);
|
|
276
310
|
if (Buffer.byteLength(content) > 512 * 1024 || bytes > 16 * 1024 * 1024) throw Error('ProductShape evidence exceeds the byte bound');
|
|
277
311
|
await writeFile(join(destination, `${node.id}.json`), content, { flag: 'wx' });
|
|
278
312
|
index.push({ id: node.id, type: node.type, title: node.title, report: `${node.id}.json` });
|
|
279
313
|
}
|
|
280
314
|
if (baselineDigest && await productModelDigest(root) !== baselineDigest) throw Error('ProductShape baseline changed during evidence preparation');
|
|
281
|
-
const content = JSON.stringify({ schemaVersion: 1, source: '@prodshape/core', version: core.version, serializationVersion: repository.config?.version ?? null, ...(baselineDigest ? { baselineDigest } : {}), artifacts: index }, null, 2) + '\n';
|
|
315
|
+
const content = JSON.stringify({ schemaVersion: 1, source: '@prodshape/core', version: core.version, serializationVersion: repository.config?.version ?? null, ...(baselineDigest ? { baselineDigest } : {}), ...(scope ? { scope } : {}), artifacts: index }, null, 2) + '\n';
|
|
282
316
|
if (Buffer.byteLength(content) > 512 * 1024) throw Error('ProductShape evidence index exceeds the byte bound');
|
|
283
317
|
await writeFile(join(destination, 'index.json'), content, { flag: 'wx' });
|
|
284
|
-
return { artifacts: index.length, bytes, serializationVersion: repository.config?.version ?? null };
|
|
318
|
+
return { artifacts: index.length, bytes, serializationVersion: repository.config?.version ?? null, ...(scope ? { scope } : {}) };
|
|
285
319
|
}
|
|
286
320
|
|
|
287
321
|
export function productReviewBinding(input) {
|
|
@@ -24,6 +24,7 @@ export function housekeepingReconciler(api, repository, owner, indexNumber) {
|
|
|
24
24
|
const value = JSON.parse(match[1]);
|
|
25
25
|
const localEvidence = url => typeof url === 'string' && url.startsWith(`https://github.com/${repository}/`) && /^(?:issues\/[1-9][0-9]*(?:#issuecomment-[1-9][0-9]*)?|pull\/[1-9][0-9]*|actions\/runs\/[1-9][0-9]*(?:\/attempts\/[1-9][0-9]*)?)$/.test(url.slice(`https://github.com/${repository}/`.length));
|
|
26
26
|
if (value.schemaVersion !== 1 || value.repository !== repository || value.disposition !== 'retire' || ![value.issue, value.requestCommentId, value.workerRunId, value.runAttempt].every(positive) || !/^[a-f0-9]{64}$/.test(value.requestId ?? '') || !/^[a-f0-9]{64}$/.test(value.requestDigest ?? '') || typeof value.reason !== 'string' || !value.reason.trim() || value.reason.length > 2000 || !Array.isArray(value.evidence) || !value.evidence.length || value.evidence.length > 20 || !value.evidence.every(localEvidence)) throw Error('Invalid owner reconciliation');
|
|
27
|
+
if (value.requestRepository !== undefined && (!new RegExp(`^${owner}/[A-Za-z0-9_.-]+$`).test(value.requestRepository) || value.requestRepository === repository || !positive(value.repositoryId))) throw Error('Invalid historical repository identity');
|
|
27
28
|
result.push({ value, comment });
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -38,8 +39,16 @@ export function housekeepingReconciler(api, repository, owner, indexNumber) {
|
|
|
38
39
|
if (!decision || !(worker.state === 'uncertain' || incompleteCodes.has(worker.code))) { workers.push(worker); continue; }
|
|
39
40
|
const { value, comment } = decision;
|
|
40
41
|
const receiptComment = await api(`issues/comments/${value.requestCommentId}`);
|
|
41
|
-
|
|
42
|
+
let receipt;
|
|
43
|
+
if (value.requestRepository !== undefined) {
|
|
44
|
+
const current = await api('');
|
|
45
|
+
if (worker.code !== 'receipt-invalid' || worker.requestCommentId !== value.requestCommentId || receiptComment.issue_url !== `https://api.github.com/repos/${repository}/issues/${item.issue}` || current.full_name !== repository || current.id !== value.repositoryId) throw Error('Historical receipt repository is not confirmed');
|
|
46
|
+
// Validate the original identifier under the explicitly recorded old namespace.
|
|
47
|
+
// The fetched comment and native execution must still belong to the current numeric repository.
|
|
48
|
+
receipt = readDispatchReceipt({ ...receiptComment, issue_url: `https://api.github.com/repos/${value.requestRepository}/issues/${item.issue}` }, value.requestRepository, item.issue);
|
|
49
|
+
} else receipt = readDispatchReceipt(receiptComment, repository, item.issue);
|
|
42
50
|
const run = await api(`actions/runs/${value.workerRunId}`);
|
|
51
|
+
if (value.requestRepository !== undefined && run.repository?.id !== value.repositoryId) throw Error('Historical execution belongs to a different repository');
|
|
43
52
|
if (receipt.id !== value.requestId || receipt.digest !== value.requestDigest || String(receipt.workerRunId) !== String(value.workerRunId) || (receipt.recovery?.rootId ?? receipt.id) !== worker.rootId || Number(comment.id) <= Number(receiptComment.id) || run.id !== value.workerRunId || run.run_attempt !== value.runAttempt || run.repository?.full_name !== repository || run.path !== stagePath(workerFor(receipt)) || run.status !== 'completed' || !Number.isFinite(Date.parse(run.updated_at)) || Date.parse(run.updated_at) > Date.parse(comment.created_at)) throw Error('Owner reconciliation no longer matches the terminal execution');
|
|
44
53
|
const url = `https://github.com/${repository}/issues/${indexNumber}#issuecomment-${comment.id}`;
|
|
45
54
|
workers.push({ ...worker, state: 'reconciled', code: 'owner-retired', original: worker, reconciliation: { ...value, commentId: comment.id, url }, nextAction: `Historical monitoring retired by the owner: ${url}. Preserve the original outcome and existing candidates; no retry or lifecycle transition is authorized.` });
|
package/src/worker-recovery.mjs
CHANGED
|
@@ -150,12 +150,22 @@ export async function observeDispatch(api, repository, owner, comment, issue, co
|
|
|
150
150
|
// Reporting is read-only so it can observe an active worker without acquiring its lease.
|
|
151
151
|
export async function observeRecovery(api, repository, owner, issueNumber, now = Date.now(), readArtifact = readActionsJson) {
|
|
152
152
|
const issue = await api(`issues/${issueNumber}`), comments = await issueComments(api, issueNumber);
|
|
153
|
-
const entries =
|
|
153
|
+
const entries = [], invalid = [];
|
|
154
|
+
for (const comment of comments.filter(c => c.user?.login === 'github-actions[bot]' && c.user.type === 'Bot' && c.body?.includes('<!-- lighthouse-dispatch:'))) {
|
|
155
|
+
try { entries.push({ comment, receipt: readDispatchReceipt(comment, repository, issueNumber) }); }
|
|
156
|
+
catch {
|
|
157
|
+
let receipt;
|
|
158
|
+
try { const matches = [...comment.body.matchAll(/<!-- lighthouse-dispatch:(\{[^\n]*\}) -->/g)]; if (matches.length === 1) receipt = JSON.parse(matches[0][1]); } catch {}
|
|
159
|
+
let worker = 'unknown';
|
|
160
|
+
try { stagePath(workerFor(receipt)); worker = workerFor(receipt); } catch {}
|
|
161
|
+
invalid.push({ issue: issueNumber, worker, outcome: 'unknown', state: 'uncertain', code: 'receipt-invalid', requestCommentId: comment.id, ...(receipt ? { rootId: receipt.recovery?.rootId ?? receipt.id, observedRunId: String(receipt.workerRunId) } : {}), nextAction: `Maintainer: inspect historical receipt https://github.com/${repository}/issues/${issueNumber}#issuecomment-${comment.id}. It cannot authenticate recovery; preserve its original bytes and reconcile its repository identity and effects.` });
|
|
162
|
+
}
|
|
163
|
+
}
|
|
154
164
|
const unattended = comments.filter(c => c.user?.login === 'github-actions[bot]' && c.user.type === 'Bot' && c.body?.includes('<!-- lighthouse-unattended:')).at(-1);
|
|
155
|
-
if (unattended && (!entries.length || unattended.id > entries.at(-1).comment.id)) return [];
|
|
165
|
+
if (!invalid.length && unattended && (!entries.length || unattended.id > entries.at(-1).comment.id)) return [];
|
|
156
166
|
const latest = new Map();
|
|
157
167
|
for (const entry of entries) latest.set(entry.receipt.recovery?.rootId ?? entry.receipt.id, entry);
|
|
158
|
-
const observations = [];
|
|
168
|
+
const observations = [...invalid];
|
|
159
169
|
for (const { comment } of latest.values()) {
|
|
160
170
|
const { dispatch, stop, run, jobs, revision, workflowRevision, ...observation } = await observeDispatch(api, repository, owner, comment, issue, comments, now, readArtifact);
|
|
161
171
|
observations.push(observation);
|