@juangcarmona/lighthouse-sdlc 0.24.3 → 0.24.4
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/package.json
CHANGED
package/src/issue-actions.mjs
CHANGED
|
@@ -32,7 +32,7 @@ import { validateStageEnvelope } from './host-contract.mjs';
|
|
|
32
32
|
import { loadRefinement, loadStageReport, prepareProposal, proposalRoot, createProposalPullRequest } from './proposal.mjs';
|
|
33
33
|
import { eligibleIssueAuthor } from './request-triage.mjs';
|
|
34
34
|
import { projectImplementationPrState, reconcileImplementationPr, setPullRequestDraft } from './pr-state.mjs';
|
|
35
|
-
import { prepareProductChange, prepareProductEvidence, productModelDigest, productModelDirectory, loadProductBridge, loadProductCore, checkProductResumePullRequest } from './product-change.mjs';
|
|
35
|
+
import { prepareProductChange, prepareProductEvidence, productEvidenceScopeText, productModelDigest, productModelDirectory, loadProductBridge, loadProductCore, checkProductResumePullRequest } from './product-change.mjs';
|
|
36
36
|
import { validateProductCandidate, preparePendingProductCandidate, bindValidatedProductCandidate, publishProductChangePullRequest, loadProductApproval, applyApprovedProductChange, collectProductApplyFiles, publishProductApply } from './product-change-actions.mjs';
|
|
37
37
|
import { assessDecomposition } from './epic.mjs';
|
|
38
38
|
import { handoff as renderHandoff, pendingQuestion, publishObservedStop, resultHandoffState, visibleNextAction, failedCheckSummary, deliveryCiHandoff, productApplyObservation, productPublicationMessage, workerStopObservation } from './handoff.mjs';
|
|
@@ -647,7 +647,7 @@ 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
|
-
const productEvidence = await prepareProductEvidence(process.cwd(), join(dir, 'product-evidence'), await loadProductCore(), { baselineDigest, scopeText:
|
|
650
|
+
const productEvidence = await prepareProductEvidence(process.cwd(), join(dir, 'product-evidence'), await loadProductCore(), { baselineDigest, scopeText: productEvidenceScopeText({ 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 } : {}) } };
|
package/src/opencode-execute.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import { verificationIntegrity } from './verification-integrity.mjs';
|
|
|
24
24
|
import { implementationPlanMetadata, prepareImplementationPlanMetadata } from './implementation-plan.mjs';
|
|
25
25
|
import { acquireEngineSlot, engineSlotWaitSeconds } from './engine-slot.mjs';
|
|
26
26
|
export { acquireEngineSlot } from './engine-slot.mjs';
|
|
27
|
-
import { prepareProductEvidence, productModelDigest, productModelDirectory, loadProductCore } from './product-change.mjs';
|
|
27
|
+
import { prepareProductEvidence, productEvidenceScopeText, productModelDigest, productModelDirectory, loadProductCore } from './product-change.mjs';
|
|
28
28
|
import { createTelemetry, telemetryContext, readTelemetry } from './telemetry.mjs';
|
|
29
29
|
import { observeCli, collectNativeFile, usageSummary } from './telemetry-opencode.mjs';
|
|
30
30
|
|
|
@@ -98,7 +98,7 @@ export async function preparePlanningProductEvidence(source, runDir, { core, ins
|
|
|
98
98
|
signal?.throwIfAborted();
|
|
99
99
|
const baselineDigest = await productModelDigest(source), reports = join(runDir, 'evidence/host/product-context');
|
|
100
100
|
const path = join(runDir, 'context.json'), context = JSON.parse(await readFile(path, 'utf8'));
|
|
101
|
-
const scopeText = context.issue ?
|
|
101
|
+
const scopeText = context.issue ? productEvidenceScopeText({ issue: context.issue, continuation: context.continuation }) : undefined;
|
|
102
102
|
const result = await prepareProductEvidence(source, reports, core, { baselineDigest, scopeText });
|
|
103
103
|
signal?.throwIfAborted();
|
|
104
104
|
await installProductEvidence(reports, source, baselineDigest);
|
package/src/product-change.mjs
CHANGED
|
@@ -254,6 +254,12 @@ export async function loadProductCore({ entry = require.resolve('@prodshape/core
|
|
|
254
254
|
return { ...core, version: metadata.version };
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
export function productEvidenceScopeText(value) {
|
|
258
|
+
if (typeof value === 'string') return value;
|
|
259
|
+
if (value && typeof value === 'object') return Object.values(value).map(productEvidenceScopeText).join('\n');
|
|
260
|
+
return '';
|
|
261
|
+
}
|
|
262
|
+
|
|
257
263
|
export async function prepareProductEvidence(root, destination, core, { baselineDigest, scopeText } = {}) {
|
|
258
264
|
if (baselineDigest && await productModelDigest(root) !== baselineDigest) throw Error('ProductShape baseline changed before evidence preparation');
|
|
259
265
|
const repository = await core.openRepository(resolve(root));
|